SilverStripe JWT

JWTAuthenticationHandler
in package
implements AuthenticationHandler Uses HeaderExtractor, RequiresAuthenticator, Injectable

Class JWTAuthenticationHandler

Table of Contents

Interfaces

AuthenticationHandler

Properties

$jwtAuthenticator  : JWTAuthenticator|null

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

Methods

authenticateRequest()

public authenticateRequest(HTTPRequest $request) : null|Member
Parameters
$request : HTTPRequest
Tags
throws
OutOfBoundsException
throws
BadMethodCallException
throws
Exception
Return values
null|Member

logIn()

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

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