User notifications¶
identity_password_match¶
Notification that a user’s identity has been verified.
- Type:
- notify
Return:
#identity_password_match{}
properties:- rsc_id:
unknown
- password:
unknown
- hash:
unknown
- rsc_id:
identity_verification¶
Request to send a verification to the user. Return ok or an error Identity may be undefined, or is a identity used for the verification.
- Type:
- first
Return:
#identity_verification{}
properties:- user_id:
unknown
- identity:
unknown
- user_id:
identity_verified¶
Notification that a user’s identity has been verified.
- Type:
- notify
Return:
#identity_verified{}
properties:- user_id:
unknown
- type:
unknown
- key:
unknown
- user_id:
logon_actions¶
Determine post-logon actions; args are the arguments passed to the logon submit wire
- Type:
- first
Return:
#logon_actions{}
properties:- args:
list
- args:
logon_ready_page¶
Check where to go after a user logs on.
- Type:
- first
- Return:
- a URL or
undefined
#logon_ready_page{}
properties:- request_page:
string
- request_page:
logon_submit¶
Handle a user logon. The posted query args are included.
Return:: {ok, UserId}
or {error, Reason}
- Type:
- first
Return:
#logon_submit{}
properties:- query_args:
list
- query_args:
set_user_language¶
Set the language of the context to a user’s prefered language
- Type:
- first
Return:
#set_user_language{}
properties:- id:
unknown
- id:
request_context¶
Called after parsing the query arguments
- Type:
- foldl
- Return:
#context{}
#request_context{}
properties:
none
session_context¶
Initialize a context from the current session. Called for every request that has a session.
- Type:
- foldl
- Return:
#context{}
#session_context{}
properties:
none
session_init¶
A new session has been intialized: session_pid is in the context. Called for every request that has a session.
- Type:
- notify
- Return:
#context{}
#session_init{}
properties:
none
session_init_fold¶
Foldl over the context containing a new session. Called for every request that has a session.
- Type:
- foldl
- Return:
#context{}
#session_init_fold{}
properties:
none
signup¶
Request a signup of a new or existing user. Arguments are similar to #signup_url{} Returns {ok, UserId} or {error, Reason}
- Type:
- first
Return:
#signup{}
properties:- id:
integer
- props:
list
- signup_props:
list
- request_confirm:
boolean
- id:
signup_check¶
signup_check Check if the signup can be handled, a fold over all modules. Fold argument/result is {ok, Props, SignupProps} or {error, Reason}
- Type:
- foldl
- Return:
{ok, Props, SignupProps}
or{error, Reason}
#signup_check{}
properties:- props:
list
- signup_props:
list
- props:
signup_confirm¶
Signal that a user has been confirmed. (map, result is ignored)
- Type:
- first
Return:
#signup_confirm{}
properties:- id:
m_rsc:resource()
- id:
signup_confirm_redirect¶
Fetch the page a user is redirected to after signing up with a confirmed identity (first)
- Type:
- first
- Return:
- a URL or
undefined
#signup_confirm_redirect{}
properties:- id:
m_rsc:resource()
- id:
signup_done¶
Signal that a user has been signed up (map, result is ignored)
- Type:
- first
Return:
#signup_done{}
properties:- id:
m_rsc:resource()
- is_verified:
boolean
- props:
list
- signup_props:
list
- id:
signup_failed_url¶
Signup failed, give the error page URL. Return {ok, Url} or undefined. Reason is returned by the signup handler for the particular signup method (username, facebook etc)
- Type:
- first
Return:
#signup_failed_url{}
properties:- reason:
unknown
- reason:
signup_url¶
Handle a signup of a user, return the follow on page for after the signup.
Return {ok, Url}
‘props’ is a proplist with properties for the person resource (email, name, etc)
‘signup_props’ is a proplist with ‘identity’ definitions and optional follow on url ‘ready_page’
An identity definition is {Kind, Identifier, IsUnique, IsVerified}
- Type:
- first
Return:
#signup_url{}
properties:- props:
list
- signup_props:
list
- props: