As the name says, it is made to be basic and direct.
Token Class Basicis default Token class
| Name | Description |
|---|---|
| __construct | Function __construct |
| Defining a new instance de Token | |
| check | Function check |
| Checking a token | |
| create | Function create |
| Receive an instance of AuthInterface user and Creating a token | |
| decode | Function Decode Token |
| Deconding a token | |
| encode | Function Encode Token |
| Enconding a Token | |
| renew | Function renew |
| Renew a Token, optionaly set any data type of string, array or null |
Description
public __construct (\AuthInterface $user, string $appKey, string $expiration, string $nobefore)
Function __construct Defining a new instance de Token
Parameters
(\AuthInterface) $user(string) $appKey(string) $expiration(string) $nobeforeReturn Values
void
Description
public check (string $token)
Function check Checking a token
Parameters
(string) $tokenReturn Values
bool
Description
public create (\AuthInterface $user, array|string|null $data)
Function create Receive an instance of AuthInterface user and Creating a token
Parameters
(\AuthInterface) $user(array|string|null) $dataReturn Values
string|null
Description
public decode (string $token)
Function Decode Token Deconding a token
Parameters
(string) $tokenReturn Values
object|null
Throws Exceptions
\Exception
Description
public encode (array $token)
Function Encode Token Enconding a Token
Parameters
(array) $tokenReturn Values
string
Description
public renew (string $token, string $expiration, string $nobefore, string|array|null $data)
Function renew Renew a Token, optionaly set any data type of string, array or null
Parameters
(string) $token(string) $expiration(string) $nobefore(string|array|null) $dataReturn Values
string|null