additional_login() = {{ServiceId::binary(), IssuerId::binary()}, UserInfo::userinfo()}
userinfo() = #user_info{issuer = undefined | binary(), subject = undefined | binary(), id_token = map(), id_info = map(), access_token = map(), plugin_info = map(), token_info = map(), additional_logins = [additional_login()], scope = map()}
access_token/1* | return the access token, if present. |
add_additional_login/4 | add an additional login. |
clear_additional_logins/2 | delete all additional logins for a service. |
display_name/1* | generate the display name. |
has_additional_login/3 | check if an additional login for the service and issuer exists. |
logged_in/1* | return if the user is logged in. |
maybe_to_atom/1* | convert a binary to atom, if the atom exists. |
new/0 | create a new userinfo structure (record). |
return/2 | generic function to return needed information. |
set_scope_if_empty/1* | set an empty scope if no scope is set. |
update_access_token/2 | update the access token in the userinfo, if it is valid. |
update_id_info/2 | update subject from the Userinfo Endpoint, if matching the userinfo. |
update_id_token/2 | claims and iss/sub coming from an Id Token. |
update_iss_sub/3 | update issuer and subject of the userinfo, if valid. |
update_plugin_info/1* | update the prepared information for the plugin about the user. |
update_scope/2* | set the scope in the userinfo. |
update_token_info/2 | update subject from the Tokeninfo Endpoint and set scopes. |
update_with_token/2 | update the structure with the information from the Token. |
userid/1* | generate the userid. |
access_token(UserInfo::userinfo()) -> {ok, AccessToken::binary} | {error, Reason::atom()}
return the access token, if present
add_additional_login(ServiceId::binary(), IssuerId::binary(), Token::map(), UserInfo::userinfo()) -> UpdatedInfo::userinfo()
add an additional login
clear_additional_logins(ServiceId::binary(), UserInfo::userinfo()) -> UpdatedInfo::userinfo()
delete all additional logins for a service
display_name(UserInfo::userinfo()) -> {ok, Name::binary} | {error, Reason::atom()}
generate the display name
has_additional_login(ServiceId::binary(), IssuerId::binary(), UserInfo::userinfo()) -> boolean()
check if an additional login for the service and issuer exists.
logged_in(UserInfo::userinfo()) -> boolean()
return if the user is logged in
maybe_to_atom(Binary::binary()) -> atom() | binary()
convert a binary to atom, if the atom exists
new() -> {ok, userinfo()}
create a new userinfo structure (record).
return(Key::atom() | {key, Key::binary()} | {additional_logins, ServiceId::binary(), WithAccessToken::boolean()}, UserInfo::userinfo()) -> {ok, Data::any()} | {ok, Iss::binary(), Sub::binary()} | boolean() | {error, Reason::atom()}
generic function to return needed information. The returned values are:
set_scope_if_empty(UserInfo::userinfo()) -> UpdatedInfo::userinfo()
set an empty scope if no scope is set
update_access_token(TokenMap::map(), UserInfo::userinfo()) -> {ok, UpdatedInfo::userinfo()} | {error, Reason::atom()}
update the access token in the userinfo, if it is valid.
update_id_info(IdInfo::map(), UserInfo::userinfo()) -> {ok, UpdatedInfo::userinfo()} | {error, Reason::atom()}
update subject from the Userinfo Endpoint, if matching the userinfo.
update_id_token(IdToken::map(), Info::userinfo()) -> {ok, userinfo()} | {error, not_match}
claims and iss/sub coming from an Id Token
update_iss_sub(Issuer::binary() | undefined, Subject::binary() | undefined, UserInfo::userinfo()) -> {ok, UpdatedInfo::userinfo()} | {error, Reason::atom()}
update issuer and subject of the userinfo, if valid.
update_plugin_info(UserInfo::userinfo()) -> UpdatedInfo::userinfo()
update the prepared information for the plugin about the user.
update_scope(Scope::map(), UserInfo::userinfo()) -> {ok, UpdatedInfo::userinfo()}
set the scope in the userinfo
update_token_info(TokenInfo::map(), UserInfo::userinfo()) -> {ok, UpdatedInfo::userinfo()} | {error, Reason::atom()}
update subject from the Tokeninfo Endpoint and set scopes.
update_with_token(Token::map(), UserInfo::userinfo()) -> {ok, UpdatedInfo::userinfo()}
update the structure with the information from the Token
userid(UserInfo::userinfo()) -> {ok, Id::binary} | {error, Reason::atom()}
generate the userid
Generated by EDoc