Basicis - Core

Logo

As the name says, it is made to be basic and direct.

View the Project on GitHub basicis/core

Basicis\Auth\Token

Token Class Basicis default Token class

Methods

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  

Token::__construct

Description

public __construct (\AuthInterface $user, string $appKey, string $expiration, string $nobefore)

Function __construct Defining a new instance de Token

Parameters

Return Values

void


Token::check

Description

public check (string $token)

Function check Checking a token

Parameters

Return Values

bool


Token::create

Description

public create (\AuthInterface $user, array|string|null $data)

Function create Receive an instance of AuthInterface user and Creating a token

Parameters

Return Values

string|null


Token::decode

Description

public decode (string $token)

Function Decode Token Deconding a token

Parameters

Return Values

object|null

Throws Exceptions

\Exception


Token::encode

Description

public encode (array $token)

Function Encode Token Enconding a Token

Parameters

Return Values

string


Token::renew

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

Return Values

string|null