[ Index ] |
PHP Cross Reference of Phabricator |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 661 lines (20 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
getSessionKindFromToken($session_token) X-Ref |
Get the session kind (e.g., anonymous, user, external account) from a session token. Returns a `KIND_` constant. param: string Session token. return: const Session kind constant. |
loadUserForSession($session_type, $session_token) X-Ref |
Load the user identity associated with a session of a given type, identified by token. When the user presents a session token to an API, this method verifies it is of the correct type and loads the corresponding identity if the session exists and is valid. NOTE: `$session_type` is the type of session that is required by the loading context. This prevents use of a Conduit sesssion as a Web session, for example. param: const The type of session to load. param: string The session token. return: PhabricatorUser|null |
establishSession($session_type, $identity_phid, $partial) X-Ref |
Issue a new session key for a given identity. Phabricator supports different types of sessions (like "web" and "conduit") and each session type may have multiple concurrent sessions (this allows a user to be logged in on multiple browsers at the same time, for instance). Note that this method is transport-agnostic and does not set cookies or issue other types of tokens, it ONLY generates a new session key. You can configure the maximum number of concurrent sessions for various session types in the Phabricator configuration. param: const Session type constant (see param: phid|null Identity to establish a session for, usually a user param: bool True to issue a partial session. return: string Newly generated session key. |
terminateLoginSessions(PhabricatorUser $user,$except_session = null) X-Ref |
Terminate all of a user's login sessions. This is used when users change passwords, linked accounts, or add multifactor authentication. param: PhabricatorUser User whose sessions should be terminated. param: string|null Optionally, one session to keep. Normally, the current return: void |
requireHighSecuritySession(PhabricatorUser $viewer,AphrontRequest $request,$cancel_uri,$jump_into_hisec = false) X-Ref |
Require high security, or prompt the user to enter high security. If the user's session is in high security, this method will return a token. Otherwise, it will throw an exception which will eventually be converted into a multi-factor authentication workflow. param: PhabricatorUser User whose session needs to be in high security. param: AphrontReqeust Current request. param: string URI to return the user to if they cancel. param: bool True to jump partial sessions directly into high return: PhabricatorAuthHighSecurityToken Security token. |
issueHighSecurityToken(PhabricatorAuthSession $session,$force = false) X-Ref |
Issue a high security token for a session, if authorized. param: PhabricatorAuthSession Session to issue a token for. param: bool Force token issue. return: PhabricatorAuthHighSecurityToken|null Token, if authorized. |
renderHighSecurityForm(array $factors,array $validation_results,PhabricatorUser $viewer,AphrontRequest $request) X-Ref |
Render a form for providing relevant multi-factor credentials. param: PhabricatorUser Viewing user. param: AphrontRequest Current request. return: AphrontFormView Renderable form. |
exitHighSecurity(PhabricatorUser $viewer,PhabricatorAuthSession $session) X-Ref |
Strip the high security flag from a session. Kicks a session out of high security and logs the exit. param: PhabricatorUser Acting user. param: PhabricatorAuthSession Session to return to normal security. return: void |
upgradePartialSession(PhabricatorUser $viewer) X-Ref |
Upgrade a partial session to a full session. param: PhabricatorAuthSession Session to upgrade. return: void |
getOneTimeLoginURI(PhabricatorUser $user,PhabricatorUserEmail $email = null,$type = self::ONETIME_RESET) X-Ref |
Retrieve a temporary, one-time URI which can log in to an account. These URIs are used for password recovery and to regain access to accounts which users have been locked out of. param: PhabricatorUser User to generate a URI for. param: PhabricatorUserEmail Optionally, email to verify when param: string Optional context string for the URI. This is purely cosmetic return: string Login URI. |
loadOneTimeLoginKey(PhabricatorUser $user,PhabricatorUserEmail $email = null,$key = null) X-Ref |
Load the temporary token associated with a given one-time login key. param: PhabricatorUser User to load the token for. param: PhabricatorUserEmail Optionally, email to verify when param: string Key user is presenting as a valid one-time login key. return: PhabricatorAuthTemporaryToken|null Token, if one exists. |
getOneTimeLoginKeyHash(PhabricatorUser $user,PhabricatorUserEmail $email = null,$key = null) X-Ref |
Hash a one-time login key for storage as a temporary token. param: PhabricatorUser User this key is for. param: PhabricatorUserEmail Optionally, email to verify when param: string The one time login key. return: string Hash of the key. |
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |