Documentation

MaxAgeValidator

Utility to validate that the maximum authentication age has not passed since the last user authetication time.

This utility uses GMP as necessary.

Table of Contents

__construct()  : mixed
Constructor.
setAuthenticationTime()  : MaxAgeValidator
Set the time which the user was authenticated at.
setCurrentTime()  : MaxAgeValidator
Set the current time. The default value is "time()".
setMaxAge()  : MaxAgeValidator
Set the maximum authentication age.
validate()  : bool
Validate that the maximum authentication age has not passed since the last user authentication time.

Methods

__construct()

Constructor.

public __construct() : mixed
Return values
mixed

setAuthenticationTime()

Set the time which the user was authenticated at.

public setAuthenticationTime(int|string $authTime) : MaxAgeValidator
Parameters
$authTime : int|string

The time which the user was authenticated at.

Return values
MaxAgeValidator

$this object.

setCurrentTime()

Set the current time. The default value is "time()".

public setCurrentTime(int|string $currentTime) : MaxAgeValidator
Parameters
$currentTime : int|string
Return values
MaxAgeValidator

$this object.

validate()

Validate that the maximum authentication age has not passed since the last user authentication time.

public validate() : bool
Return values
bool

true when the maximum authentication age has not passed since the last user authentication time. If false is returned, it means re-authentication is necessary.

Search results