Factory interface for creating OAuth2 based AuthProvider instances.
| Constructor and description |
|---|
OAuth2Auth
(java.lang.Object delegate) |
| Type | Name and description |
|---|---|
OAuth2Auth |
api(io.vertx.core.http.HttpMethod method, java.lang.String path, java.util.Map<java.lang.String, java.lang.Object> params, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.util.Map<java.lang.String, java.lang.Object>>> handler)Call OAuth2 APIs. |
java.lang.String |
authorizeURL(java.util.Map<java.lang.String, java.lang.Object> params)Generate a redirect URL to the authN/Z backend. |
static OAuth2Auth |
create(Vertx vertx, io.vertx.ext.auth.oauth2.OAuth2FlowType flow, java.util.Map<java.lang.String, java.lang.Object> config)Create a OAuth2 auth provider |
static OAuth2Auth |
create(Vertx vertx, io.vertx.ext.auth.oauth2.OAuth2FlowType flow)Create a OAuth2 auth provider |
static OAuth2Auth |
createKeycloak(Vertx vertx, io.vertx.ext.auth.oauth2.OAuth2FlowType flow, java.util.Map<java.lang.String, java.lang.Object> config)Create a OAuth2 auth provider |
java.lang.Object |
getDelegate() |
void |
getToken(java.util.Map<java.lang.String, java.lang.Object> params, io.vertx.core.Handler<io.vertx.core.AsyncResult<AccessToken>> handler)Returns the Access Token object. |
boolean |
hasJWTToken()Returns true if this provider supports JWT tokens as the access_token. |
| Methods inherited from class | Name |
|---|---|
class AuthProvider |
authenticate, getDelegate |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Call OAuth2 APIs.
method - HttpMethodpath - target pathparams - parametershandler - handlerGenerate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
Create a OAuth2 auth provider
vertx - the Vertx instanceconfig - the config (see OAuth2ClientOptions)Create a OAuth2 auth provider
vertx - the Vertx instanceCreate a OAuth2 auth provider
vertx - the Vertx instanceconfig - the config as exported from the admin consoleReturns the Access Token object.
params - - JSON with the options, each flow requires different options.handler - - The handler returning the results.Returns true if this provider supports JWT tokens as the access_token. This is typically true if the provider implements the `openid-connect` protocol. This is a plain return from the config option jwtToken, which is false by default. This information is important to validate grants. Since pure OAuth2 should be used for authorization and when a token is requested all grants should be declared, in case of openid-connect this is not true. OpenId will issue a token and all grants will be encoded on the token itself so the requester does not need to list the required grants.