class ApiTokenCookieFactory

Methods

__construct(Repository $config, ServerFactory $servers, AuthManager $auth, Container $app)

Create an API token cookie factory instance.

Cookie
make(string|int $userId, string $csrfToken, string|null $guard = null)

Create a new API token cookie.

Cookie
forget()

Expire the API token cookie for the current request.

array
getCookieConfig()

Resolve the session cookie attributes for the current request.

string
createToken(string|int $userId, string $csrfToken, int $expiration, string|null $provider)

Create a new JWT token for the given user ID and CSRF token.

Details

at line 20
__construct(Repository $config, ServerFactory $servers, AuthManager $auth, Container $app)

Create an API token cookie factory instance.

Parameters

Repository $config
ServerFactory $servers
AuthManager $auth
Container $app

at line 31
Cookie make(string|int $userId, string $csrfToken, string|null $guard = null)

Create a new API token cookie.

Parameters

string|int $userId
string $csrfToken
string|null $guard

Return Value

Cookie

at line 54
Cookie forget()

Expire the API token cookie for the current request.

Return Value

Cookie

at line 78
protected array getCookieConfig()

Resolve the session cookie attributes for the current request.

Return Value

array

at line 93
protected string createToken(string|int $userId, string $csrfToken, int $expiration, string|null $provider)

Create a new JWT token for the given user ID and CSRF token.

Parameters

string|int $userId
string $csrfToken
int $expiration
string|null $provider

Return Value

string