RedirectAuthHandler

An auth handler that's used to handle auth by redirecting user to a custom login page.

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 handler

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

param $authProvider [AuthProvider] the auth service to use create($authProvider)

Create a handler

param $authProvider [AuthProvider] the auth service to use param $loginRedirectURL [string] the url to redirect the user to create($authProvider, $loginRedirectURL)

Create a handler

param $authProvider [AuthProvider] the auth service to use param $loginRedirectURL [string] the url to redirect the user to param $returnURLParam [string] the name of param used to store return url information in session create($authProvider, $loginRedirectURL, $returnURLParam)

Arguments

$arg0

AuthProvider

$arg1

string

$arg2

string

Response

\io\vertx\jphp\ext\web\handler\AuthHandler

the 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

Constants

Default name of param used to store return url information in session

DEFAULT_RETURN_URL_PARAM
var

php文件只是为了写代码方便,常量的实际值请参考原java文件