Is this Behaviour ok?


Hi all

I wrote a behaviour and want to know, if it is correct or not, for example typespec , etc.

defmodule SapOdataService.AuthClient do

@moduledoc ~S"""
  Specification SAP authentication with basic authorization.

  @type username :: String.t
  @type password :: String.t

  @type userinfo :: [username: String.t, firstname: String.t, lastname: String.t]
  @type reason :: String.t

  @doc """
   HTTP request with basic authentication.
  @callback sign_in(username, password) :: {:ok, userinfo} | {:error, reason}




Initial look seems good. Best way to test though, write tests and run dialyzer on them. :slight_smile: