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}
end
Thanks