LoginRadius v1.0.0 LoginRadius.Infrastructure View Source

Elixir wrapper for the LoginRadius Infrastructure API module, and SOTT generation functions.

Link to this section Summary

Functions

Formats an Elixir DateTime struct into a string following format “YYYY/MM/DD H:i:s”

GET - Generate SOTT: Generates a Secured One Time Token. https://docs.loginradius.com/api/v2/customer-identity-api/session/generate-sott-token

GET - Get Server Time: Queries for basic server information. Time difference is used to generate values for SOTT generation. https://docs.loginradius.com/api/v2/customer-identity-api/configuration/get-server-time

Generates a Secured One Time Token locally

Appends N bytes with the value of chr(N) where N is the number of bytes required to make the final block of data the same size as block size

Link to this section Functions

Link to this function format_datetime(date) View Source
format_datetime(DateTime.t()) :: String.t()

Formats an Elixir DateTime struct into a string following format “YYYY/MM/DD H:i:s”

Link to this function generate_sott(validity_length \\ 10) View Source
generate_sott(integer()) :: LoginRadius.response()

GET - Generate SOTT: Generates a Secured One Time Token. https://docs.loginradius.com/api/v2/customer-identity-api/session/generate-sott-token

Link to this function get_server_time(time_difference \\ 10) View Source
get_server_time(integer()) :: LoginRadius.handle_response()

GET - Get Server Time: Queries for basic server information. Time difference is used to generate values for SOTT generation. https://docs.loginradius.com/api/v2/customer-identity-api/configuration/get-server-time

Link to this function local_generate_sott(validity_length \\ 10) View Source
local_generate_sott(integer()) :: String.t()

Generates a Secured One Time Token locally.

Link to this function pbkdf2(hash_algorithm, password, salt, iterations, length) View Source
pbkdf2(atom(), String.t(), <<_::0>>, integer(), integer()) :: <<_::0>>

PBKDF2 key derivation function.

Link to this function pkcs7_pad(data, block_size) View Source
pkcs7_pad(String.t(), integer()) :: String.t()

Appends N bytes with the value of chr(N) where N is the number of bytes required to make the final block of data the same size as block size.