public interface OAuth2Auth extends AuthProvider
AuthProvider instances.| Modifier and Type | Method and Description |
|---|---|
OAuth2Auth |
api(HttpMethod method,
String path,
JsonObject params,
Handler<AsyncResult<JsonObject>> handler)
Call OAuth2 APIs.
|
String |
authorizeURL(JsonObject params)
Generate a redirect URL to the authN/Z backend.
|
static OAuth2Auth |
create(Vertx vertx,
OAuth2FlowType flow)
Create a OAuth2 auth provider
|
static OAuth2Auth |
create(Vertx vertx,
OAuth2FlowType flow,
OAuth2ClientOptions config)
Create a OAuth2 auth provider
|
static OAuth2Auth |
createKeycloak(Vertx vertx,
OAuth2FlowType flow,
JsonObject config)
Create a OAuth2 auth provider
|
void |
getToken(JsonObject params,
Handler<AsyncResult<AccessToken>> handler)
Returns the Access Token object.
|
boolean |
hasJWTToken()
Returns true if this provider supports JWT tokens as the access_token.
|
authenticatestatic OAuth2Auth createKeycloak(Vertx vertx, OAuth2FlowType flow, JsonObject config)
vertx - the Vertx instanceconfig - the config as exported from the admin consolestatic OAuth2Auth create(Vertx vertx, OAuth2FlowType flow, OAuth2ClientOptions config)
vertx - the Vertx instanceconfig - the configstatic OAuth2Auth create(Vertx vertx, OAuth2FlowType flow)
vertx - the Vertx instanceString authorizeURL(JsonObject params)
void getToken(JsonObject params, Handler<AsyncResult<AccessToken>> handler)
params - - JSON with the options, each flow requires different options.handler - - The handler returning the results.OAuth2Auth api(HttpMethod method, String path, JsonObject params, Handler<AsyncResult<JsonObject>> handler)
method - HttpMethodpath - target pathparams - parametershandler - handlerboolean hasJWTToken()
Copyright © 2016. All rights reserved.