class AccessToken implements ExtenderInterface

Methods

type(string $type)

Add a type of access token.

void
extend( Container $container, Extension|null $extension = null)

No description

Details

AccessToken type(string $type)

Add a type of access token.

The class decides what its type is called, how long it lasts by default, and whether a site may change that — see `Flarum\Http\AccessToken`. Registering it here is what lets rows of that type be hydrated as the right class, and what puts its lifetime in front of an administrator alongside the types core ships.

Parameters

string $type : The ::class attribute of the token class, which must extend \Flarum\Http\AccessToken.

Return Value

AccessToken

void extend( Container $container, Extension|null $extension = null)

Parameters

Container $container
Extension|null $extension

Return Value

void