CreateTokenMutationCreator
extends MutationCreator
in package
implements
OperationResolver
Uses
RequiresAuthenticator, MemberTokenGenerator, Extensible
Table of Contents
Interfaces
- OperationResolver
Properties
- $customAuthenticators : array<string|int, Authenticator>
- Extra authenticators to use for logging in with username / password
- $jwtAuthenticator : JWTAuthenticator|null
Methods
- args() : array<string|int, mixed>
- attributes() : array<string|int, mixed>
- getCustomAuthenticators() : array<string|int, Authenticator>
- getErrorMessage() : string
- Humanise error message based on status code
- resolve() : array<string|int, mixed>
- setCustomAuthenticators() : CreateTokenMutationCreator
- setJWTAuthenticator() : $this
- Inject authenticator this mutation should use
- type() : Type
- generateResponse() : array<string|int, mixed>
- Generate MemberToken response
- getAuthenticatedMember() : Member|MemberExtension
- Get an authenticated member from the given request
- getJWTAuthenticator() : JWTAuthenticator|null
- getLoginAuthenticators() : array<string|int, Authenticator>|Generator
- Get any authenticator we should use for logging in users
Properties
$customAuthenticators
Extra authenticators to use for logging in with username / password
protected
array<string|int, Authenticator>
$customAuthenticators
= []
$jwtAuthenticator
protected
JWTAuthenticator|null
$jwtAuthenticator
= null
Methods
args()
public
args() : array<string|int, mixed>
Return values
array<string|int, mixed>attributes()
public
attributes() : array<string|int, mixed>
Return values
array<string|int, mixed>getCustomAuthenticators()
public
getCustomAuthenticators() : array<string|int, Authenticator>
Return values
array<string|int, Authenticator>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>setCustomAuthenticators()
public
setCustomAuthenticators(array<string|int, Authenticator> $authenticators) : CreateTokenMutationCreator
Parameters
- $authenticators : array<string|int, Authenticator>
Return values
CreateTokenMutationCreatorsetJWTAuthenticator()
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
getAuthenticatedMember()
Get an authenticated member from the given request
protected
getAuthenticatedMember(array<string|int, mixed> $args, HTTPRequest $request) : Member|MemberExtension
Parameters
- $args : array<string|int, mixed>
- $request : HTTPRequest
Return values
Member|MemberExtensiongetJWTAuthenticator()
protected
getJWTAuthenticator() : JWTAuthenticator|null
Return values
JWTAuthenticator|nullgetLoginAuthenticators()
Get any authenticator we should use for logging in users
protected
getLoginAuthenticators() : array<string|int, Authenticator>|Generator