SilverStripe JWT

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 = []

Methods

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
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
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

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|MemberExtension

getLoginAuthenticators()

Get any authenticator we should use for logging in users

protected getLoginAuthenticators() : array<string|int, Authenticator>|Generator
Return values
array<string|int, Authenticator>|Generator

        
On this page

Search results