JWTAuthenticationHandler
in package
implements
AuthenticationHandler
Uses
HeaderExtractor, RequiresAuthenticator, Injectable
Class JWTAuthenticationHandler
Table of Contents
Interfaces
- AuthenticationHandler
Properties
Methods
- authenticateRequest() : null|Member
- logIn() : void
- Authenticate on every run, based on the header, not relying on sessions or cookies JSON Web Tokens are stateless
- logOut() : void
- setJWTAuthenticator() : $this
- Inject authenticator this mutation should use
- getAuthorizationHeader() : string|null
- Get JWT from request, or null if not present
- getJWTAuthenticator() : JWTAuthenticator|null
Properties
$jwtAuthenticator
protected
JWTAuthenticator|null
$jwtAuthenticator
= null
Methods
authenticateRequest()
public
authenticateRequest(HTTPRequest $request) : null|Member
Parameters
- $request : HTTPRequest
Tags
Return values
null|MemberlogIn()
Authenticate on every run, based on the header, not relying on sessions or cookies JSON Web Tokens are stateless
public
logIn(Member $member[, bool $persistent = false ][, HTTPRequest|null $request = null ]) : void
Parameters
- $member : Member
- $persistent : bool = false
- $request : HTTPRequest|null = null
logOut()
public
logOut([HTTPRequest|null $request = null ]) : void
Parameters
- $request : HTTPRequest|null = null
setJWTAuthenticator()
Inject authenticator this mutation should use
public
setJWTAuthenticator(JWTAuthenticator $authenticator) : $this
Parameters
- $authenticator : JWTAuthenticator
Return values
$thisgetAuthorizationHeader()
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