VuFind API Documentation

AuthToken
in package

Class AuthToken

Tags
category

VuFind

author

Josef Moravec moravec@mzk.cz

license

https://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Page

Table of Contents

$expiresIn  : int|null
Number of seconds in token expires
$timeCreated  : int
Timestamp of token creation
$token  : string
Access token
$tokenType  : string
Token type (usually 'Bearer')
__construct()  : mixed
AuthToken constructor.
__toString()  : string
To string casting method
getExpiresIn()  : int|null
Return expires in value in seconds
getHeaderValue()  : string
String to be used as Authorization header value
isExpired()  : bool
Is token expired?

Properties

$expiresIn

Number of seconds in token expires

protected int|null $expiresIn

$timeCreated

Timestamp of token creation

protected int $timeCreated

$tokenType

Token type (usually 'Bearer')

protected string $tokenType

Methods

__construct()

AuthToken constructor.

public __construct(string $token, int|null $expiresIn[, string $tokenType = 'Bearer' ]) : mixed
Parameters
$token : string

Access token string

$expiresIn : int|null

Expires in seconds?

$tokenType : string = 'Bearer'

Type of token

Return values
mixed

__toString()

To string casting method

public __toString() : string
Return values
string

getExpiresIn()

Return expires in value in seconds

public getExpiresIn() : int|null
Return values
int|null

getHeaderValue()

String to be used as Authorization header value

public getHeaderValue() : string
Return values
string

isExpired()

Is token expired?

public isExpired() : bool
Return values
bool

Search results