PDOStorage implements StorageInterface
Store login tokens in database with PDO class.
Tags
Table of Contents
$db | Manager | |
---|---|---|
__construct() | mixed | |
findTriplet() | int | |
storeTriplet() | mixed | |
cleanTriplet() | mixed | |
replaceTriplet() | Replace current token after successful authentication. | mixed |
cleanAllTriplets() | mixed | |
cleanExpiredTokens() | Remove all expired triplets of all users. | mixed |
Properties
$db
protected
Manager
$db
Methods
__construct()
public
__construct(
$db :
Manager
)
: mixed
Parameters
- $db : Manager
[description]
Return values
mixedfindTriplet()
public
findTriplet(
$credential :
mixed
, $token :
string
, $persistentToken :
string
)
: int
Parameters
- $credential : mixed
- $token : string
- $persistentToken : string
Return values
intstoreTriplet()
public
storeTriplet(
$credential :
mixed
, $token :
string
, $persistentToken :
string
, $expire :
int
)
: mixed
Parameters
- $credential : mixed
- $token : string
- $persistentToken : string
- $expire : int
Return values
mixedcleanTriplet()
public
cleanTriplet(
$credential :
mixed
, $persistentToken :
string
)
: mixed
Parameters
- $credential : mixed
- $persistentToken : string
Return values
mixedreplaceTriplet()
Replace current token after successful authentication.
public
replaceTriplet(
$credential :
mixed
, $token :
string
, $persistentToken :
string
, $expire :
int
)
: mixed
Parameters
- $credential : mixed
- $token : string
- $persistentToken : string
- $expire : int
Return values
mixedcleanAllTriplets()
public
cleanAllTriplets(
$credential :
mixed
)
: mixed
Parameters
- $credential : mixed
Return values
mixedcleanExpiredTokens()
Remove all expired triplets of all users.
public
cleanExpiredTokens(
$expiryTime :
int
)
: mixed
Parameters
- $expiryTime : int
Timestamp, all tokens before this time will be deleted