SilverStripe JWT

RefreshTokenMutationCreator extends MutationCreator
in package
implements OperationResolver Uses RequiresAuthenticator, HeaderExtractor, MemberTokenGenerator, Extensible

Table of Contents

Interfaces

OperationResolver

Properties

$jwtAuthenticator  : JWTAuthenticator|null

Methods

attributes()  : array<string|int, mixed>
getErrorMessage()  : string
Humanise error message based on status code
resolve()  : array<string|int, mixed>
setJWTAuthenticator()  : $this
Inject authenticator this mutation should use
type()  : Type
generateResponse()  : array<string|int, mixed>
Generate MemberToken response
getAuthorizationHeader()  : string|null
Get JWT from request, or null if not present
getJWTAuthenticator()  : JWTAuthenticator|null

Properties

Methods

getErrorMessage()

Humanise error message based on status code

public getErrorMessage(string $status) : string
Parameters
$status : string
Tags
throws
InvalidArgumentException
Return values
string

resolve()

public resolve(mixed $object, array<string|int, mixed> $args, mixed $context, ResolveInfo $info) : array<string|int, mixed>
Parameters
$object : mixed
$args : array<string|int, mixed>
$context : mixed
$info : ResolveInfo
Tags
throws
NotFoundExceptionInterface
throws
ValidationException
throws
BadMethodCallException
throws
OutOfBoundsException
throws
Exception
Return values
array<string|int, mixed>

generateResponse()

Generate MemberToken response

protected generateResponse(string $status[, Member $member = null ][, string $token = null ]) : array<string|int, mixed>
Parameters
$status : string

Status code

$member : Member = null
$token : string = null
Return values
array<string|int, mixed>

Response in format required by MemberToken

getAuthorizationHeader()

Get JWT from request, or null if not present

protected getAuthorizationHeader(HTTPRequest $request) : string|null
Parameters
$request : HTTPRequest
Return values
string|null

        
On this page

Search results