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:

lib/private/Authentication/Token/Manager.php#62

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:

\OC\Authentication\Token\IToken

public OC\Authentication\Token\Manager::updateToken($token)
Save the updated token
Source:

lib/private/Authentication/Token/Manager.php#100

Parameters:
Throws:

\OC\Authentication\Exceptions\InvalidTokenException

public OC\Authentication\Token\Manager::updateTokenActivity($token)
Update token activity timestamp
Source:

lib/private/Authentication/Token/Manager.php#111

Parameters:
Throws:

\OC\Authentication\Exceptions\InvalidTokenException

public OC\Authentication\Token\Manager::getTokenByUser($uid)
Source:

lib/private/Authentication/Token/Manager.php#120

Parameters:
  • $uid (string)
Returns:

\OC\Authentication\Token\IToken[]

public OC\Authentication\Token\Manager::getToken($tokenId)
Get a token by token
Source:

lib/private/Authentication/Token/Manager.php#135

Parameters:
  • $tokenId (string)
Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Throws:

\RuntimeException when OpenSSL reports a problem

Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Throws:

\RuntimeException when OpenSSL reports a problem

Returns:

\OC\Authentication\Token\IToken

public OC\Authentication\Token\Manager::getTokenById($tokenId)
Get a token by token id
Source:

lib/private/Authentication/Token/Manager.php#165

Parameters:
  • $tokenId (int)
Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Returns:

\OC\Authentication\Token\IToken

public OC\Authentication\Token\Manager::renewSessionToken($oldSessionId, $sessionId)
Source:

lib/private/Authentication/Token/Manager.php#183

Parameters:
  • $oldSessionId (string)
  • $sessionId (string)
Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Returns:

\OC\Authentication\Token\IToken

public OC\Authentication\Token\Manager::getPassword($savedToken, $tokenId)
Source:

lib/private/Authentication/Token/Manager.php#200

Parameters:
Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Throws:

\OC\Authentication\Exceptions\PasswordlessTokenException

Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Throws:

\OC\Authentication\Exceptions\PasswordlessTokenException

Returns:

string

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:

lib/private/Authentication/Token/Manager.php#233

Parameters:
Returns:

\OC\Authentication\Token\IToken

Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Throws:

\RuntimeException when OpenSSL reports a problem

Throws:

\OC\Authentication\Exceptions\InvalidTokenException

Throws:

\RuntimeException when OpenSSL reports a problem

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