Module oidcc

Function Index

add_openid_provider/2 add an OpenID Connect Provider to the list of possible Providers.
add_openid_provider/3
create_redirect_for_session/1 same as create_redirect_url/4 but with all parameters being fetched from the given session, except the provider.
create_redirect_for_session/2 same as create_redirect_url/4 but with all parameters being fetched from the given session, except the provider.
create_redirect_url/1 same as create_redirect_url/4 but with State and Nonce being undefined and scope being openid.
create_redirect_url/2 same as create_redirect_url/4 but with State and Nonce being undefined.
find_all_openid_provider/1
find_openid_provider/1
get_openid_provider_info/1 get information from a given OpenId Connect Provider.
get_openid_provider_list/0 get a list of all currently configured OpenId Connect Provider.
introspect_token/2 introspect the given token at the given provider.
register_module/1
retrieve_and_validate_token/2 retrieve the token using the authcode received before and directly validate the result.
retrieve_and_validate_token/3
retrieve_fresh_token/2
retrieve_fresh_token/3
retrieve_user_info/2 retrieve the informations of a user given by its token map or an access token.
retrieve_user_info/3

Function Details

add_openid_provider/2

add_openid_provider(IssuerOrConfigEP::binary(), LocalEndpoint::binary()) -> {ok, Id::binary(), Pid::pid()}

add an OpenID Connect Provider to the list of possible Providers

this automatically triggers the fetching of the configuration endpoint

add_openid_provider/3

add_openid_provider(IssuerOrConfigEP::binary(), LocalEndpoint::binary(), AdditionalConfig::map()) -> {ok, Id::binary(), Pid::pid()} | {error, Reason::any()}

create_redirect_for_session/1

create_redirect_for_session(Session::pid()) -> {ok, binary()}

same as create_redirect_url/4 but with all parameters being fetched from the given session, except the provider

create_redirect_for_session/2

create_redirect_for_session(Session::pid(), UrlExtension::map()) -> {ok, binary()}

same as create_redirect_url/4 but with all parameters being fetched from the given session, except the provider

create_redirect_url/1

create_redirect_url(OpenIdProviderId::binary()) -> {ok, binary()} | {error, provider_not_ready}

same as create_redirect_url/4 but with State and Nonce being undefined and scope being openid

create_redirect_url/2

create_redirect_url(OpenIdProviderId::binary(), Config::map()) -> {ok, binary()} | {error, provider_not_ready}

same as create_redirect_url/4 but with State and Nonce being undefined

find_all_openid_provider/1

find_all_openid_provider(Issuer::binary()) -> {ok, [pid()]} | {error, not_found}

find_openid_provider/1

find_openid_provider(Issuer::binary()) -> {ok, pid()} | {error, not_found}

get_openid_provider_info/1

get_openid_provider_info(Pid::pid() | binary()) -> {ok, map()}

get information from a given OpenId Connect Provider

the parameter can either be the Pid or it's Id. The result is a map containing all the information gathered by connecting to the configuration endpoint given at the beginning. the map also contains a boolean flag 'ready' which is true, once the configuration has been fetched.

get_openid_provider_list/0

get_openid_provider_list() -> {ok, [{binary(), pid()}]}

get a list of all currently configured OpenId Connect Provider

it is a list of tuples {Id, Pid}

introspect_token/2

introspect_token(Token, ProviderOrConfig) -> {ok, map()} | {error, any()}

introspect the given token at the given provider

this is done by looking up the IntrospectionEndpoint from the configuration and then requesting info, using the client credentials as authentication

register_module/1

register_module(Module) -> any()

retrieve_and_validate_token/2

retrieve_and_validate_token(AuthCode, ProviderId) -> any()

retrieve the token using the authcode received before and directly validate the result.

the authcode was sent to the local endpoint by the OpenId Connect provider, using redirects. the result is textual representation of the token and should be verified using parse_and_validate_token/3

retrieve_and_validate_token/3

retrieve_and_validate_token(AuthCode, ProviderId, Config) -> any()

retrieve_fresh_token/2

retrieve_fresh_token(RefreshToken, OpenIdProvider) -> any()

retrieve_fresh_token/3

retrieve_fresh_token(RefreshToken, Scopes, OpenIdProvider) -> any()

retrieve_user_info/2

retrieve_user_info(TokenMap::map() | binary(), ProviderIdOrPid::binary()) -> {ok, map()} | {error, any()}

retrieve the informations of a user given by its token map or an access token

this is done by looking up the UserInfoEndpoint from the configuration and then requesting info, using the access token as bearer token

retrieve_user_info/3

retrieve_user_info(Token, ProviderIdOrPid, Subject) -> {ok, map()} | {error, any()}


Generated by EDoc