Behaviours: oidcc_client.
See also: watts_http_api.
bin_error_msg/2* | conver an error and the details into a binary error message. |
error_msg/2* | conver an error and the details into a string error message. |
get_cookie_session_type/1* | get the session and its type from cookie data. |
get_return_url/2* | get the urls from the rsp and retrun the on that fits the result. |
get_session_type/1* | get the session and its type from a cowboy request. |
handle_failed_for_session/5* | helper function to generate a redirect depending of the requests origin. |
login_failed/2 | unused function to be compliant with behaviour. |
login_failed/3 | handles a failed login of a user at the web interface (java script ui). |
login_succeeded/1 | unused function to be compliant with behaviour. |
login_succeeded/2 | handle the successful login of a user at an oidc provider. |
redirect_back/3* | redirect back depending on the result passed in. |
redirect_error/2* | redirect back to the main site with an error session to display. |
redirect_set_cookie/2* | redirect to the main site and set cookie depending on the session. |
return_session_type/1* | return the session and its type might also be undefined. |
set_cookie/2* | set the cookie for a given session or clear it. |
bin_error_msg(Reason::any(), Details::any()) -> binary()
conver an error and the details into a binary error message
error_msg(Reason::any(), Details::any()) -> string()
conver an error and the details into a string error message
get_cookie_session_type(Other::any()) -> {atom() | tuple(), undefined | pid()}
get the session and its type from cookie data
get_return_url(X1::{ok | error, map()}, Rsp::watts_rsp:rsp()) -> binary()
get the urls from the rsp and retrun the on that fits the result.
get_session_type(X1::map()) -> {atom() | tuple(), undefined | pid()}
get the session and its type from a cowboy request
handle_failed_for_session(SessionType::any(), SessPid::pid(), EnvMap::map(), Reason::atom(), Details::any()) -> {ok, [tuple()]}
helper function to generate a redirect depending of the requests origin.
login_failed(Reason::any(), Details::any()) -> {ok, [tuple()]}
unused function to be compliant with behaviour
login_failed(Reason::atom(), Details::any(), EnvironmentMap::map()) -> {ok, [tuple()]}
handles a failed login of a user at the web interface (java script ui).
See also: login_succeeded/2.
login_succeeded(TokenMap::any()) -> {ok, [tuple()]}
unused function to be compliant with behaviour
login_succeeded(TokenMap::map(), EnvironmentMap::map()) -> {ok, [tuple()]}
handle the successful login of a user at an oidc provider. This only handles logins via the java script web interface, logins at the api using access tokens are handled directly at the api. This basically calls the watts:login_with_oidcc function and handles the result.
See also: watts_http_api, watts:login_with_oidcc/2.
redirect_back(Result::{ok | error, map()}, Session::pid(), EnvMap::map()) -> {ok, [tuple()]}
redirect back depending on the result passed in
redirect_error(ErrorMsg::binary(), EnvMap::map()) -> {ok, [tuple()]}
redirect back to the main site with an error session to display
redirect_set_cookie(Session::pid(), EnvMap::map()) -> {ok, [tuple()]}
redirect to the main site and set cookie depending on the session.
return_session_type(X1::any()) -> {atom() | tuple(), undefined | pid()}
return the session and its type might also be undefined
set_cookie(Session::pid() | undefined, EnvMap::map()) -> tuple()
set the cookie for a given session or clear it.
Generated by EDoc