ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCtrlToken Class Reference

Class ilCtrlToken is responsible for generating and storing unique CSRF tokens. More...

+ Inheritance diagram for ilCtrlToken:
+ Collaboration diagram for ilCtrlToken:

Public Member Functions

 __construct (string $token)
 ilCtrlToken Constructor More...
 
 verifyWith (string $token)
 @inheritDoc More...
 
 getToken ()
 @inheritDoc More...
 
 verifyWith (string $token)
 Compares the given token to the stored one of the given user. More...
 
 getToken ()
 Returns the token string of this instance. More...
 

Private Attributes

string $token
 

Detailed Description

Class ilCtrlToken is responsible for generating and storing unique CSRF tokens.

Author
Thibeau Fuhrer thf@s.nosp@m.tude.nosp@m.r-rai.nosp@m.mann.nosp@m..ch

Definition at line 27 of file class.ilCtrlToken.php.

Constructor & Destructor Documentation

◆ __construct()

ilCtrlToken::__construct ( string  $token)

ilCtrlToken Constructor

Parameters
string$token

Definition at line 41 of file class.ilCtrlToken.php.

42 {
43 $this->token = $token;
44 }

References $token.

Member Function Documentation

◆ getToken()

ilCtrlToken::getToken ( )

@inheritDoc

Implements ilCtrlTokenInterface.

Definition at line 57 of file class.ilCtrlToken.php.

57 : string
58 {
59 return $this->token;
60 }

References $token.

◆ verifyWith()

ilCtrlToken::verifyWith ( string  $token)

@inheritDoc

Implements ilCtrlTokenInterface.

Definition at line 49 of file class.ilCtrlToken.php.

49 : bool
50 {
51 return ($this->token === $token);
52 }

References $token.

Field Documentation

◆ $token

string ilCtrlToken::$token
private

Definition at line 34 of file class.ilCtrlToken.php.

Referenced by __construct(), getToken(), and verifyWith().


The documentation for this class was generated from the following file: