auth::authenticate (public)
auth::authenticate [ -return_url return_url ] \ [ -authority_id authority_id ] [ -username username ] \ [ -email email ] -password password [ -persistent ] [ -no_cookie ] \ [ -first_names first_names ] [ -last_name last_name ] \ [ -host_node_id host_node_id ]
Defined in packages/acs-authentication/tcl/authentication-procs.tcl
Try to authenticate and login the user forever by validating the username/password combination, and return authentication and account status codes.
- Switches:
- -return_url
(optional)- If specified, this can be included in account status messages.
- -authority_id
(optional)- The ID of the authority to ask to verify the user. Defaults to local authority.
- -username
(optional)- Authority specific username of the user.
- User's email address. You must supply either username or email.
- -password
(required)- The password as the user entered it.
- -persistent
(boolean) (optional)- Set this if you want a permanent login cookie
- -no_cookie
(boolean) (optional)- Set this if you don't want to issue a login cookie
- -first_names
(optional)- -last_name
(optional)- -host_node_id
(optional)- Optional parameter used to determine the cookie domain from the host_node_map
- Returns:
- Array list with the following entries:
- auth_status: Whether authentication succeeded. ok, no_account, bad_password, auth_error, failed_to_connect
- auth_message: Human-readable message about what went wrong. Guaranteed to be set if auth_status is not ok. Should be ignored if auth_status is ok. May contain HTML.
- account_status: Account status from authentication server. ok, closed.
- account_url: A URL to redirect the user to. Could e.g. ask the user to update his password.
- account_message: Human-readable message about account status. Guaranteed to be set if auth_status is not ok and account_url is empty. If nonempty, must be relayed to the user regardless of account_status. May contain HTML. This proc is responsible for concatenating any remote and/or local account messages into one single message which can be displayed to the user.
- user_id: Set to local user_id if auth_status is ok.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- auth_authenticate, auth_use_email_for_login_p