AuthToken
in package
Class representing a token code value object
Table of Contents
- EXPECTED_LENGTH = 6
- Valid token length
- $token : string
- Token value
- code() : string
- Return the token value
- withCode() : AuthToken
- Create an instance with the provided token
- __construct() : mixed
- Create instance
Constants
EXPECTED_LENGTH
Valid token length
public
mixed
EXPECTED_LENGTH
= 6
Properties
$token
Token value
private
string
$token
Methods
code()
Return the token value
public
code() : string
Return values
string —token value
withCode()
Create an instance with the provided token
public
static withCode(NonEmptyStringType $token) : AuthToken
Parameters
- $token : NonEmptyStringType
-
Token
Return values
AuthToken —Instance
__construct()
Create instance
private
__construct(string $token) : mixed
Parameters
- $token : string
-
Token