__construct |
( |
|
$baseUrl, |
|
|
|
$tokenSalt |
|
) |
| |
authenticate |
( |
|
$username, |
|
|
|
$password |
|
) |
| |
Authenticate the user. If authenticated, register the user session
- Parameters
-
String | $username | The username |
String | $password | The password |
- Returns
- true if the user could be authenticated.
getActionTicketLifeTime |
( |
| ) |
|
getAndCreateNextActionTicket |
( |
|
$footprintId | ) |
|
To prevent Cross-site request forgery each form has a parameter pntActionTicket that will change each time the form is printed. It is generated here and stored in the session. When an action is invoked, the ticket is checked and removed from the session.
- Parameters
-
string | $footprintId | the token of the page on which the form is situated |
- Returns
- string the ticket value
isAuthenticated |
( |
|
$request, |
|
|
|
$scout |
|
) |
| |
- Returns
- wheather the user is authenticated, or true if authentication is not required (default).
- Parameters
-
isEntryPage |
( |
|
$handler, |
|
|
|
$request |
|
) |
| |
To be overridden for LoginPage if used to be the only entry page, PntNoAuthenticator allows urls with no requestData
- Parameters
-
- Returns
- boolean whether $handler is an entry page that does not require a valid pntRef
isValidActionTicket |
( |
|
$ticket, |
|
|
|
$footprintId |
|
) |
| |
To prevent Cross-site request forgery each form has a parameter pntActionTicket that will change each time the form is printed. It is stored in the session. When an action is invoked, the ticket is checked and removed. All other tickets printed on the page are also removed. Outdated tickets are removed.
- Parameters
-
string | $ticket | the ticket to be checked |
string | $footprintId | the token of the page on which the form is situated |
- Returns
- boolean wheather the ticket is valid for the page token
- Exceptions
-
isValidFootprint |
( |
|
$footprintId | ) |
|
logOut |
( |
|
$exception = null | ) |
|
Log out the user. Default implementation is no authentication so logout is ignored
- Parameters
-
Exception | $exception | if security threat, or null if normal logout |
- Returns
- string a new token
removeOutdatedActionFootprints |
( |
& |
$footPrints | ) |
|
- Returns
- a reference to a session variable for this baseUrl
userHasCredential |
( |
|
$code | ) |
|
Default implementation allways returns true.
- Parameters
-
string | $code | Code that identifies the credential, or null if only a valid user is required |
- Returns
- boolean Wheather the user has the specified credential
$actionTicketLifeTime = 300 |
$footprintLifeTime = 1800 |
The documentation for this class was generated from the following file: