Behaviours: gen_server.
session() = #state{id = unknown | pid(), creation = integer(), type = undefined | type(), issuer_id = undefined | binary(), sess_token = undefined | binary(), user_agent = undefined | binary(), rsp = any(), ip = any(), error = any(), user_info = undefined | watts_userinfo:userinfo(), max_age = pos_integer(), killed = boolean(), redirection = any()}
type() = oidc | rest | {rsp, Ui::ui | no_ui, Login::login | no_login}
add_additional_login/3 | add an additional login to the session. |
clear_additional_logins/2 | clear additional logins for the given service. |
clear_redirection/1 | clear the redirection in the session. |
close/1 | send a cast to stop the session. |
code_change/3 | code change does nothing. |
get_display_name/1 | get the display name of the user. |
get_error/1 | get the error used for displaying login error messages at the UI. |
get_id/1 | call the process to return the id. |
get_iss_id/1 | get the Issuer id. |
get_max_age/1 | get the max age of this session. |
get_redirection/1 | get the redirection config. |
get_rsp/1 | get the rsp data from the ssession. |
get_sess_token/1 | get the session token by calling the process. |
get_type/1 | get the session type. |
get_user_info/1 | get the userinfo data from the session. |
get_userid/1 | get the WaTTS userid. |
handle_call/3 | implement the handle call to handle all the public function. |
handle_cast/2 | handle cast reacts only to the stop cast. |
handle_info/2 | handle the timeout. |
init/1 | intialize the session with the given token. |
is_logged_in/1 | check if the user in this session is logged in; web ui only. |
is_same_ip/2 | check if the peer ip is the same as used before. |
is_user_agent/2 | check if the user agent is the same as used before. |
kill/1 | send a cast to kill the session. |
set_error/2 | set an error to be displayed to the user. |
set_iss_id/2 | set the issuer id. |
set_iss_sub/3 | set issuer and subject. |
set_max_age/2 | set the max age for this session. |
set_redirection/4 | set the redirection for login, used for additional logins (also RSP). |
set_rsp/2 | set the rsp data for the session. |
set_token/2 | set an id token and update information. |
set_type/2 | set the session type. |
start_link/1 | start the session process with the token, linked. |
terminate/2 | termination, just log a message and tell the manager. |
add_additional_login(IssuerId::binary(), Token::map(), Pid::pid()) -> ok
add an additional login to the session
clear_additional_logins(ServiceId::binary(), Pid::pid()) -> ok
clear additional logins for the given service
clear_redirection(Pid::pid()) -> ok
clear the redirection in the session
close(Pid::pid()) -> ok
send a cast to stop the session
code change does nothing
get_display_name(Pid::pid()) -> {ok, Name::binary()}
get the display name of the user
get_error(Pid::pid()) -> {ok, Error::binary()}
get the error used for displaying login error messages at the UI
get_id(Pid::pid() | undefined) -> {ok, ID::binary() | undefined}
call the process to return the id
get_iss_id(Pid::pid()) -> {ok, IssId::binary()}
get the Issuer id
get_max_age(Pid::pid()) -> {ok, MaxAge::non_neg_integer()}
get the max age of this session
get_redirection(Pid::pid()) -> {ok, Redirection::map()}
get the redirection config
get_rsp(Pid::pid()) -> {ok, watts_rsp:rsp() | undefined}
get the rsp data from the ssession
get_sess_token(Pid::pid()) -> {ok, Token::binary()}
get the session token by calling the process
get_type(Pid::pid()) -> {ok, type() | undefined}
get the session type
get_user_info(Pid::pid()) -> {ok, UserInfo::watts_userinfo:userinfo()}
get the userinfo data from the session
get_userid(Pid::pid()) -> {ok, ID::binary()}
get the WaTTS userid
handle_call(Request::any(), From::any(), State::session()) -> {reply, any(), session(), pos_integer()}
implement the handle call to handle all the public function
handle_cast(Msg::close | any(), State::session()) -> {stop, normal, session()} | {noreply, session(), pos_integer()}
handle cast reacts only to the stop cast
handle the timeout
init(Token::binary()) -> {ok, session()}
intialize the session with the given token. Also setting the max age
is_logged_in(Pid::pid()) -> true | false
check if the user in this session is logged in; web ui only
is_same_ip(IP, Pid) -> any()
check if the peer ip is the same as used before
is_user_agent(UserAgent, Pid) -> any()
check if the user agent is the same as used before
kill(Pid::pid()) -> ok
send a cast to kill the session
set_error(Error::binary(), Pid::pid()) -> ok
set an error to be displayed to the user
set_iss_id(IssuerId::binary(), Pid::pid()) -> ok
set the issuer id
set_iss_sub(Issuer::binary(), Subject::binary(), Pid::pid()) -> ok
set issuer and subject
set_max_age(MaxAge::pos_integer(), Pid::pid()) -> ok
set the max age for this session
set_redirection(ServiceId::binary(), Params::map(), ProviderId::binary(), Pid::pid()) -> ok
set the redirection for login, used for additional logins (also RSP)
set_rsp(Client::watts_rsp:rsp(), Pid::pid()) -> ok
set the rsp data for the session
set_token(Token::map(), Pid::pid()) -> ok
set an id token and update information
set_type(Type::type(), Pid::pid()) -> ok
set the session type
start_link(Token::binary()) -> {ok, pid()}
start the session process with the token, linked
terminate(Reason::any(), State::session()) -> ok
termination, just log a message and tell the manager
Generated by EDoc