JWTAuthHandler

An auth handler that provides JWT Authentication support.

package

Default

Methods

__construct

__construct() 

Add a set of required authorities for this auth handler

addAuthorities( $arg0) : $this

Arguments

$arg0

array

Response

$this

a reference to this, so the API can be used fluently

Add a required authority for this auth handler

addAuthority( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this, so the API can be used fluently

Authorizes the given user against all added authorities.

authorize( $arg0,  $arg1) : void

Arguments

$arg0

User

$arg1

callable

Create a JWT auth handler

create( $arg0,  $arg1 = null) : \io\vertx\jphp\ext\web\handler\JWTAuthHandler
static

param $authProvider [JWTAuth] the auth provider to use create($authProvider)

Create a JWT auth handler

param $authProvider [JWTAuth] the auth provider to use. param $skip [string] create($authProvider, $skip)

Arguments

$arg0

JWTAuth

$arg1

string

Response

\io\vertx\jphp\ext\web\handler\JWTAuthHandler

the auth handler

Something has happened, so handle it.

handle( $arg0) : void

Arguments

$arg0

RoutingContext

Parses the credentials from the request into a JsonObject. The implementation should be able to extract the required info for the auth provider in the format the provider expects.

parseCredentials( $arg0,  $arg1) : void

Arguments

$arg0

RoutingContext

$arg1

callable

Set the audience list

setAudience( $arg0) : $this

Arguments

$arg0

array

Response

$this

a reference to this for fluency

Set whether expiration is ignored

setIgnoreExpiration( $arg0) : $this

Arguments

$arg0

boolean

Response

$this

a reference to this for fluency

Set the issuer

setIssuer( $arg0) : $this

Arguments

$arg0

string

Response

$this

a reference to this for fluency