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.Modifier and Type | Field and Description |
---|---|
static TypeArg<OAuth2Auth> |
__TYPE_ARG |
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)
Deprecated.
|
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) |
OAuth2Auth |
decodeToken(String token,
Handler<AsyncResult<AccessToken>> handler)
Decode a token to a
AccessToken object. |
Observable<AccessToken> |
decodeTokenObservable(String token)
Deprecated.
use
rxDecodeToken(java.lang.String) instead |
OAuth2Auth |
getDelegate() |
OAuth2FlowType |
getFlowType()
Returns the configured flow type for the Oauth2 provider.
|
String |
getScopeSeparator()
Returns the scope separator.
|
void |
getToken(JsonObject params,
Handler<AsyncResult<AccessToken>> handler)
Returns the Access Token object.
|
Observable<AccessToken> |
getTokenObservable(JsonObject params)
Deprecated.
use
rxGetToken(io.vertx.core.json.JsonObject) instead |
boolean |
hasJWTToken()
Returns true if this provider supports JWT tokens as the access_token.
|
OAuth2Auth |
introspectToken(String token,
Handler<AsyncResult<AccessToken>> 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.
|
OAuth2Auth |
introspectToken(String token,
String tokenType,
Handler<AsyncResult<JsonObject>> 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.
|
Observable<AccessToken> |
introspectTokenObservable(String token)
Deprecated.
use
rxIntrospectToken(java.lang.String) instead |
Observable<JsonObject> |
introspectTokenObservable(String token,
String tokenType)
Deprecated.
use
rxIntrospectToken(java.lang.String) instead |
static OAuth2Auth |
newInstance(OAuth2Auth arg) |
Single<JsonObject> |
rxApi(HttpMethod method,
String path,
JsonObject params)
Call OAuth2 APIs.
|
Single<AccessToken> |
rxDecodeToken(String token)
Decode a token to a
AccessToken object. |
Single<AccessToken> |
rxGetToken(JsonObject params)
Returns the Access Token object.
|
Single<AccessToken> |
rxIntrospectToken(String token)
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.
|
Single<JsonObject> |
rxIntrospectToken(String token,
String tokenType)
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.
|
authenticate, authenticateObservable, newInstance, rxAuthenticate
public static final TypeArg<OAuth2Auth> __TYPE_ARG
public OAuth2Auth(OAuth2Auth delegate)
public OAuth2Auth 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.@Deprecated public Observable<AccessToken> getTokenObservable(JsonObject params)
rxGetToken(io.vertx.core.json.JsonObject)
insteadparams
- - JSON with the options, each flow requires different options.public Single<AccessToken> rxGetToken(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
- handler@Deprecated public Observable<JsonObject> apiObservable(HttpMethod method, String path, JsonObject params)
rxApi(io.vertx.core.http.HttpMethod, java.lang.String, io.vertx.core.json.JsonObject)
insteadmethod
- HttpMethodpath
- target pathparams
- parameterspublic Single<JsonObject> rxApi(HttpMethod method, String path, JsonObject params)
method
- HttpMethodpath
- target pathparams
- parameterspublic boolean hasJWTToken()
public OAuth2Auth decodeToken(String token, Handler<AsyncResult<AccessToken>> handler)
AccessToken
object. This is useful to handle bearer JWT tokens.token
- the access token (base64 string)handler
- A handler to receive the event@Deprecated public Observable<AccessToken> decodeTokenObservable(String token)
rxDecodeToken(java.lang.String)
insteadAccessToken
object. This is useful to handle bearer JWT tokens.token
- the access token (base64 string)public Single<AccessToken> rxDecodeToken(String token)
AccessToken
object. This is useful to handle bearer JWT tokens.token
- the access token (base64 string)public OAuth2Auth introspectToken(String token, Handler<AsyncResult<AccessToken>> handler)
token
- the access token (base64 string)handler
- A handler to receive the event@Deprecated public Observable<AccessToken> introspectTokenObservable(String token)
rxIntrospectToken(java.lang.String)
insteadtoken
- the access token (base64 string)public Single<AccessToken> rxIntrospectToken(String token)
token
- the access token (base64 string)public OAuth2Auth introspectToken(String token, String tokenType, Handler<AsyncResult<JsonObject>> handler)
token
- the access token (base64 string)tokenType
- hint to the token type e.g.: `access_token`handler
- A handler to receive the event@Deprecated public Observable<JsonObject> introspectTokenObservable(String token, String tokenType)
rxIntrospectToken(java.lang.String)
insteadtoken
- the access token (base64 string)tokenType
- hint to the token type e.g.: `access_token`public Single<JsonObject> rxIntrospectToken(String token, String tokenType)
token
- the access token (base64 string)tokenType
- hint to the token type e.g.: `access_token`public String getScopeSeparator()
public OAuth2FlowType getFlowType()
public static OAuth2Auth newInstance(OAuth2Auth arg)
Copyright © 2017. All rights reserved.