DefaultTokenMapper

class OC\Authentication\Token\DefaultTokenMapper
Source:lib/private/Authentication/Token/DefaultTokenMapper.php#41
Parent:OCP\AppFramework\Db\QBMapper

Methods

public OC\Authentication\Token\DefaultTokenMapper::__construct($db)
Source:lib/private/Authentication/Token/DefaultTokenMapper.php#42
public OC\Authentication\Token\DefaultTokenMapper::invalidate($token)
Invalidate (delete) a given token
Source:

lib/private/Authentication/Token/DefaultTokenMapper.php#51

Parameters:
  • $token (string)
public OC\Authentication\Token\DefaultTokenMapper::invalidateOld($olderThan, $remember=\OC\Authentication\Token\IToken::DO_NOT_REMEMBER)
Source:

lib/private/Authentication/Token/DefaultTokenMapper.php#64

Parameters:
  • $olderThan (int)
  • $remember (int)
public OC\Authentication\Token\DefaultTokenMapper::getToken($token)
Get the user UID for the given token
Source:

lib/private/Authentication/Token/DefaultTokenMapper.php#82

Parameters:
  • $token (string)
Throws:

\OCP\AppFramework\Db\DoesNotExistException

Returns:

\OC\Authentication\Token\DefaultToken

public OC\Authentication\Token\DefaultTokenMapper::getTokenById($id)
Get the token for $id
Source:

lib/private/Authentication/Token/DefaultTokenMapper.php#106

Parameters:
  • $id (int)
Throws:

\OCP\AppFramework\Db\DoesNotExistException

Returns:

\OC\Authentication\Token\DefaultToken

public OC\Authentication\Token\DefaultTokenMapper::getTokenByUser($uid)
Get all tokens of a user
The provider may limit the number of result rows in case of an abuse
where a high number of (session) tokens is generated
Source:

lib/private/Authentication/Token/DefaultTokenMapper.php#132

Parameters:
  • $uid (string)
Returns:

\OC\Authentication\Token\DefaultToken[]

public OC\Authentication\Token\DefaultTokenMapper::deleteById($uid, $id)
Source:lib/private/Authentication/Token/DefaultTokenMapper.php#151
public OC\Authentication\Token\DefaultTokenMapper::deleteByName($name)
delete all auth token which belong to a specific client if the client was deleted
Source:

lib/private/Authentication/Token/DefaultTokenMapper.php#166

Parameters:
  • $name (string)