Azure Active Directory OpenID v0.1.1 AzureADOpenId View Source

Azure Active Directory authentication using OpenID.

Link to this section Summary

Functions

Get a redirect url for authorization using Azure Active Directory login

Checks if the library is configured with the standard Elixir configuration (i.e. using the config files)

Returns a human readable user name from an id_token/0. This is useful as the Azure Active Directory id_token/0 can be very inconsistent in how user names are stored

Handles and validates the id_token/0 in the callback response. The redirect_uri used in the authorize_url!/1 function should redirect to a path that uses this funtion

Returns the redirect url for logging out of Azure Active Directory

Returns the redirect url for logging out of Azure Active Directory

Link to this section Types

Link to this type callback_response() View Source
callback_response() :: {:ok, id_token()} | {:error, String.t(), String.t()}
Link to this type config() View Source
config() :: nil | [config_values()]
Link to this type config_values() View Source
config_values() :: {:tenant, String.t()} | {:client_id, String.t()}
Link to this type id_token() View Source
id_token() :: map()

Link to this section Functions

Link to this function authorize_url!(redirect_uri, config \\ nil) View Source
authorize_url!(uri(), config()) :: uri()

Get a redirect url for authorization using Azure Active Directory login.

Link to this function configured?() View Source
configured?() :: boolean()

Checks if the library is configured with the standard Elixir configuration (i.e. using the config files).

Link to this function get_user_name(token) View Source
get_user_name(id_token()) :: String.t()

Returns a human readable user name from an id_token/0. This is useful as the Azure Active Directory id_token/0 can be very inconsistent in how user names are stored.

Link to this function handle_callback!(conn, config \\ nil) View Source
handle_callback!(conn(), config()) :: callback_response()

Handles and validates the id_token/0 in the callback response. The redirect_uri used in the authorize_url!/1 function should redirect to a path that uses this funtion.

Link to this function logout_url(redirect_uri) View Source
logout_url(uri()) :: uri()

Returns the redirect url for logging out of Azure Active Directory.

Link to this function logout_url(config \\ nil, redirect_uri \\ nil) View Source
logout_url(config(), uri() | nil) :: uri()

Returns the redirect url for logging out of Azure Active Directory.