OAuth2AuthHandler

An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.

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 OAuth2 auth handler without host pinning.

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

Most providers will not look to the redirect url but always redirect to the preconfigured callback. So this factory does not provide a callback url.

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

Create a OAuth2 auth handler with host pinning

param $authProvider [OAuth2Auth] the auth provider to use param $callbackURL [string] the callback URL you entered in your provider admin console, usually it should be something like: https://myserver:8888/callback create($authProvider, $callbackURL)

Arguments

$arg0

OAuth2Auth

$arg1

string

Response

\io\vertx\jphp\ext\web\handler\OAuth2AuthHandler

the auth handler

Extra parameters needed to be passed while requesting a token.

extraParams( $arg0) : $this

Arguments

$arg0

array

Response

$this

self

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

add the callback handler to a given route.

setupCallback( $arg0) : $this

Arguments

$arg0

Route

Response

$this

self