class Tokenize (View source)

Methods

static bool
makeCsrfToken(int|null $time = null)

Csrf token creator

static string
make()

GGenerate an encrypted key

static array|null
csrf(int $time = null)

Get a csrf token generate

static bool
csrfExpired(int $time = null)

Check if the token expires

static bool
verify(string $token, bool $strict = false)

Check if csrf token is valid

static void
clear()

Destroy the token

Details

static bool makeCsrfToken(int|null $time = null)

Csrf token creator

Parameters

int|null $time

Return Value

bool

static string make()

GGenerate an encrypted key

Return Value

string

static array|null csrf(int $time = null)

Get a csrf token generate

Parameters

int $time

Return Value

array|null

static bool csrfExpired(int $time = null)

Check if the token expires

Parameters

int $time

Return Value

bool

static bool verify(string $token, bool $strict = false)

Check if csrf token is valid

Parameters

string $token
bool $strict

Return Value

bool

static void clear()

Destroy the token

Return Value

void