public class OAuth2Auth extends AuthProvider
AuthProvider
instances.
NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen.Constructor and Description |
---|
OAuth2Auth(OAuth2Auth delegate) |
Modifier and Type | Method and Description |
---|---|
OAuth2Auth |
api(HttpMethod method,
String path,
JsonObject params,
Handler<AsyncResult<JsonObject>> handler)
Call OAuth2 APIs.
|
Observable<JsonObject> |
apiObservable(HttpMethod method,
String path,
JsonObject params)
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
|
Object |
getDelegate() |
void |
getToken(JsonObject params,
Handler<AsyncResult<AccessToken>> handler)
Returns the Access Token object.
|
Observable<AccessToken> |
getTokenObservable(JsonObject params)
Returns the Access Token object.
|
boolean |
hasJWTToken()
Returns true if this provider supports JWT tokens as the access_token.
|
static OAuth2Auth |
newInstance(OAuth2Auth arg) |
authenticate, authenticateObservable, newInstance
public OAuth2Auth(OAuth2Auth delegate)
public Object getDelegate()
getDelegate
in class AuthProvider
public static OAuth2Auth createKeycloak(Vertx vertx, OAuth2FlowType flow, JsonObject config)
vertx
- the Vertx instanceflow
- config
- the config as exported from the admin consolepublic static OAuth2Auth create(Vertx vertx, OAuth2FlowType flow, OAuth2ClientOptions config)
vertx
- the Vertx instanceflow
- config
- the configpublic static OAuth2Auth create(Vertx vertx, OAuth2FlowType flow)
vertx
- the Vertx instanceflow
- public String authorizeURL(JsonObject params)
params
- public void getToken(JsonObject params, Handler<AsyncResult<AccessToken>> handler)
params
- - JSON with the options, each flow requires different options.handler
- - The handler returning the results.public Observable<AccessToken> getTokenObservable(JsonObject params)
params
- - JSON with the options, each flow requires different options.public OAuth2Auth api(HttpMethod method, String path, JsonObject params, Handler<AsyncResult<JsonObject>> handler)
method
- HttpMethodpath
- target pathparams
- parametershandler
- handlerpublic Observable<JsonObject> apiObservable(HttpMethod method, String path, JsonObject params)
method
- HttpMethodpath
- target pathparams
- parameterspublic boolean hasJWTToken()
public static OAuth2Auth newInstance(OAuth2Auth arg)
Copyright © 2016. All rights reserved.