Factory interface for creating OAuth2 based @see \io\vertx\jphp\ext\auth\AuthProvider instances.
package |
Default |
---|
__construct()
authenticate( $arg0, $arg1) : void
The first argument is a JSON object containing information for authenticating the user. What this actually contains depends on the specific implementation. In the case of a simple username/password based authentication it is likely to contain a JSON object with the following structure:
{ "username": "tim", "password": "mypassword" }For other types of authentication it contain different information - for example a JWT token or OAuth bearer token.
If the user is successfully authenticated a object is passed to the handler in an \io.vertx.core.AsyncResult. The user object can then be used for authorisation.
array
callable
create( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\ext\auth\oauth2\OAuth2Auth
param $vertx [Vertx] the Vertx instance create($vertx)
Create a OAuth2 auth provider
param $vertx [Vertx] the Vertx instance
param $flow [string]
this method is deprecated
create($vertx, $flow)
Create a OAuth2 auth provider
param $vertx [Vertx] the Vertx instance param $config [OAuth2ClientOptions | array] the config create($vertx, $config)
Create a OAuth2 auth provider
param $vertx [Vertx] the Vertx instance
param $flow [string]
param $config [OAuth2ClientOptions | array] the config
this method is deprecated
create($vertx, $flow, $config)
Vertx
string | array | OAuth2ClientOptions
array | OAuth2ClientOptions
\io\vertx\jphp\ext\auth\oauth2\OAuth2Auth
the auth provider
createKeycloak( $arg0, $arg1, $arg2) : \io\vertx\jphp\ext\auth\oauth2\OAuth2Auth
deprecated |
---|
Vertx
string
array
\io\vertx\jphp\ext\auth\oauth2\OAuth2Auth
the auth provider
decodeToken( $arg0, $arg1) : $this
deprecated |
---|
string
callable
$this
self
getFlowType() : string
string
the flow type.
getScopeSeparator() : string
The RFC 6749 states that a scope is expressed as a set of case-sensitive and space-delimited strings, however vendors tend not to agree on this and we see the following cases being used: space, plus sign, comma.
deprecated | |
---|---|
string
what value was used in the configuration of the object, falling back to the default value which is a space.
getToken( $arg0, $arg1) : void
deprecated |
---|
array
callable
introspectToken( $arg0, $arg1, $arg2 = null) : $this
param $token [string] the access token (base64 string) param $handler [callable] A handler to receive the event introspectToken($token, $handler)
Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
param $token [string] the access token (base64 string)
param $tokenType [string] hint to the token type e.g.: access_token
param $handler [callable] A handler to receive the event
introspectToken($token, $tokenType, $handler)
string
callable | string
callable
$this
self
loadJWK( $arg0) : $this
When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
callable
$this
rbacHandler( $arg0) : $this
OAuth2RBAC
$this