Manager¶
-
class
OC\Authentication\Token\Manager¶ Source: lib/private/Authentication/Token/Manager.php#37 Implements: OC\Authentication\Token\IProvider
Properties¶
Methods¶
-
public
OC\Authentication\Token\Manager::__construct($defaultTokenProvider, $publicKeyTokenProvider)¶ Source: lib/private/Authentication/Token/Manager.php#45
-
public
OC\Authentication\Token\Manager::generateToken($token, $uid, $loginName, $password, $name, $type=\OC\Authentication\Token\IToken::TEMPORARY_TOKEN, $remember=\OC\Authentication\Token\IToken::DO_NOT_REMEMBER)¶ - Create and persist a new token
Source: Parameters: - $token (string)
- $uid (string)
- $loginName (string)
- $password (string | null)
- $name (string)
- $type (int) token type
- $remember (int) whether the session token should be used for remember-me
Returns:
-
public
OC\Authentication\Token\Manager::updateToken($token)¶ - Save the updated token
Source: Parameters: - $token (
OC\Authentication\Token\IToken)
Throws: - $token (
-
public
OC\Authentication\Token\Manager::updateTokenActivity($token)¶ - Update token activity timestamp
Source: Parameters: - $token (
OC\Authentication\Token\IToken)
Throws: - $token (
-
public
OC\Authentication\Token\Manager::getTokenByUser($uid)¶ Source: Parameters: - $uid (string)
Returns:
-
public
OC\Authentication\Token\Manager::getToken($tokenId)¶ - Get a token by token
Source: Parameters: - $tokenId (string)
Throws: Throws: \RuntimeExceptionwhen OpenSSL reports a problemThrows: Throws: \RuntimeExceptionwhen OpenSSL reports a problemReturns:
-
public
OC\Authentication\Token\Manager::getTokenById($tokenId)¶ - Get a token by token id
Source: Parameters: - $tokenId (int)
Throws: Returns:
-
public
OC\Authentication\Token\Manager::renewSessionToken($oldSessionId, $sessionId)¶ Source: Parameters: - $oldSessionId (string)
- $sessionId (string)
Throws: Returns:
-
public
OC\Authentication\Token\Manager::getPassword($savedToken, $tokenId)¶ Source: Parameters: - $savedToken (
OC\Authentication\Token\IToken) - $tokenId (string) session token
Throws: Throws: Throws: Throws: Returns: string
- $savedToken (
-
public
OC\Authentication\Token\Manager::setPassword($token, $tokenId, $password)¶ Source: lib/private/Authentication/Token/Manager.php#205
-
public
OC\Authentication\Token\Manager::invalidateToken($token)¶ Source: lib/private/Authentication/Token/Manager.php#210
-
public
OC\Authentication\Token\Manager::invalidateTokenById($uid, $id)¶ Source: lib/private/Authentication/Token/Manager.php#215
-
public
OC\Authentication\Token\Manager::invalidateOldTokens()¶ Source: lib/private/Authentication/Token/Manager.php#220
-
public
OC\Authentication\Token\Manager::rotate($token, $oldTokenId, $newTokenId)¶ Source: Parameters: - $token (
OC\Authentication\Token\IToken) - $oldTokenId (string)
- $newTokenId (string)
Returns: Throws: Throws: \RuntimeExceptionwhen OpenSSL reports a problemThrows: Throws: \RuntimeExceptionwhen OpenSSL reports a problem- $token (
-
public
OC\Authentication\Token\Manager::markPasswordInvalid($token, $tokenId)¶ Source: lib/private/Authentication/Token/Manager.php#267
-
public
OC\Authentication\Token\Manager::updatePasswords($uid, $password)¶ Source: lib/private/Authentication/Token/Manager.php#271