DefaultTokenProvider¶
-
class
OC\Authentication\Token\
DefaultTokenProvider
¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#45 Implements: OC\Authentication\Token\IProvider
Properties¶
Methods¶
-
public
OC\Authentication\Token\DefaultTokenProvider::
__construct
($mapper, $crypto, $config, $logger, $time)¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#62
-
public
OC\Authentication\Token\DefaultTokenProvider::
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: lib/private/Authentication/Token/DefaultTokenProvider.php#86
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\DefaultTokenProvider::
updateToken
($token)¶ - Save the updated token
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#118
Parameters: - $token (
OC\Authentication\Token\IToken
)
Throws: - $token (
-
public
OC\Authentication\Token\DefaultTokenProvider::
updateTokenActivity
($token)¶ - Update token activity timestamp
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#131
Parameters: - $token (
OC\Authentication\Token\IToken
)
Throws: - $token (
-
public
OC\Authentication\Token\DefaultTokenProvider::
getTokenByUser
($uid)¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#144
-
public
OC\Authentication\Token\DefaultTokenProvider::
getToken
($tokenId)¶ - Get a token by token
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#156
Parameters: - $tokenId (string)
Throws: Throws: Throws: Throws: Returns:
-
public
OC\Authentication\Token\DefaultTokenProvider::
getTokenById
($tokenId)¶ - Get a token by token id
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#178
Parameters: - $tokenId (int)
Throws: Throws: Throws: Throws: Returns:
-
public
OC\Authentication\Token\DefaultTokenProvider::
renewSessionToken
($oldSessionId, $sessionId)¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#198
Parameters: - $oldSessionId (string)
- $sessionId (string)
Throws: Returns:
-
public
OC\Authentication\Token\DefaultTokenProvider::
getPassword
($savedToken, $tokenId)¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#226
Parameters: - $savedToken (
OC\Authentication\Token\IToken
) - $tokenId (string) session token
Throws: Throws: Throws: Throws: Returns: string
- $savedToken (
-
public
OC\Authentication\Token\DefaultTokenProvider::
setPassword
($token, $tokenId, $password)¶ - Encrypt and set the password of the given token
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#242
Parameters: - $token (
OC\Authentication\Token\IToken
) - $tokenId (string)
- $password (string)
Throws: - $token (
-
public
OC\Authentication\Token\DefaultTokenProvider::
invalidateToken
($token)¶ - Invalidate (delete) the given session token
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#256
Parameters: - $token (string)
-
public
OC\Authentication\Token\DefaultTokenProvider::
invalidateTokenById
($uid, $id)¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#260
-
public
OC\Authentication\Token\DefaultTokenProvider::
invalidateOldTokens
()¶ - Invalidate (delete) old session tokens
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#267
-
public
OC\Authentication\Token\DefaultTokenProvider::
rotate
($token, $oldTokenId, $newTokenId)¶ - Rotate the token. Usefull for for example oauth tokens
Source: lib/private/Authentication/Token/DefaultTokenProvider.php#284
Parameters: - $token (
OC\Authentication\Token\IToken
) - $oldTokenId (string)
- $newTokenId (string)
Returns: - $token (
-
public
OC\Authentication\Token\DefaultTokenProvider::
markPasswordInvalid
($token, $tokenId)¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#341
-
public
OC\Authentication\Token\DefaultTokenProvider::
updatePasswords
($uid, $password)¶ Source: lib/private/Authentication/Token/DefaultTokenProvider.php#350