Copyright © 2009-2021 Marc Worrell Date: 2009-04-24
Authors: Marc Worrell (marc@worrell.nl).
confirm/2 | Set the user to 'confirmed'. |
is_auth/1 | Check if the visitor has been authenticated. |
is_enabled/2 | Check if the user is enabled, an user is enabled when the rsc is published and within its publication date range. |
logoff/1 | Forget about the user being logged on. |
logon/2 | Logon an user whose id we know, set all user prefs in the context. |
logon_pw/3 | Logon a username/password combination, checks passwords with m_identity. |
logon_redirect/3 | Logon an user and redirect the user agent. |
logon_switch/2 | Allow an admin user to switch to another user account. |
logon_switch/3 | Allow an admin user to switch to another user account. |
switch_user/2 | Request the client's auth worker to re-authenticate as a new user. |
confirm(UserId::m_rsc:resource_id(), Context::z:context()) -> {ok, z:context()} | {error, user_not_enabled}
Set the user to 'confirmed'.
is_auth(Context::z:context()) -> boolean()
Check if the visitor has been authenticated. Assumes a completely initalized context.
is_enabled(UserId::m_rsc:resource_id(), Context::z:context()) -> boolean()
Check if the user is enabled, an user is enabled when the rsc is published and within its publication date range.
logoff(Context::z:context()) -> z:context()
Forget about the user being logged on.
logon(UserId::m_rsc:resource_id(), Context::z:context()) -> {ok, z:context()} | {error, user_not_enabled}
Logon an user whose id we know, set all user prefs in the context.
logon_pw(Username::binary(), Password::binary(), Context::z:context()) -> {boolean(), z:context()}
Logon a username/password combination, checks passwords with m_identity.
logon_redirect(UserId::m_rsc:resource_id(), Url::binary() | undefined, Context::z:context()) -> ok | {error, term()}
Logon an user and redirect the user agent. The MQTT websocket MUST be connected.
logon_switch(UserId::m_rsc:resource_id(), Context::z:context()) -> {ok, z:context()} | {error, eacces}
Allow an admin user to switch to another user account.
logon_switch(UserId::m_rsc:resource_id(), SudoUserId::m_rsc:resource_id(), Context::z:context()) -> {ok, z:context()} | {error, eacces}
Allow an admin user to switch to another user account.
switch_user(UserId::m_rsc:resource_id(), Context::z:context()) -> ok | {error, eacces}
Request the client's auth worker to re-authenticate as a new user
Generated by EDoc