ex_bank_id v0.1.0 ExBankID.Auth.Payload
Provides the struct used when initiating a authentication
Link to this section Summary
Functions
Returns a Payload struct containing the given ip address and personal number.
Link to this section Types
Link to this type
reason()
Specs
reason() :: binary()
Link to this section Functions
Link to this function
new(ip_address, opts \\ [])
Specs
new(binary(), Keyword.t()) :: {:error, reason()} | %ExBankID.Auth.Payload{endUserIp: binary(), personalNumber: binary() | nil}
Returns a Payload struct containing the given ip address and personal number.
Examples
iex> ExBankID.Auth.Payload.new("1.1.1.1") %ExBankID.Auth.Payload{endUserIp: "1.1.1.1"}
iex> ExBankID.Auth.Payload.new("qwerty")
iex> ExBankID.Auth.Payload.new("1.1.1.1", [personal_number: "190000000000"]) %ExBankID.Auth.Payload{endUserIp: "1.1.1.1", personalNumber: "190000000000"}
iex> ExBankID.Auth.Payload.new("1.1.1.1", [personal_number: "Not a personal number"])