RefreshTokenMutationCreator
extends MutationCreator
in package
implements
OperationResolver
Uses
RequiresAuthenticator, HeaderExtractor, MemberTokenGenerator, Extensible
Table of Contents
Interfaces
- OperationResolver
Properties
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
$jwtAuthenticator
protected
JWTAuthenticator|null
$jwtAuthenticator
= null
Methods
attributes()
public
attributes() : array<string|int, mixed>
Return values
array<string|int, mixed>getErrorMessage()
Humanise error message based on status code
public
getErrorMessage(string $status) : string
Parameters
- $status : string
Tags
Return values
stringresolve()
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
Return values
array<string|int, mixed>setJWTAuthenticator()
Inject authenticator this mutation should use
public
setJWTAuthenticator(JWTAuthenticator $authenticator) : $this
Parameters
- $authenticator : JWTAuthenticator
Return values
$thistype()
public
type() : Type
Return values
TypegenerateResponse()
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|nullgetJWTAuthenticator()
protected
getJWTAuthenticator() : JWTAuthenticator|null