public interface OAuth2Auth extends AuthProvider
AuthProvider
instances.Modifier and Type | Method and Description |
---|---|
String |
authorizeURL(JsonObject params)
Generate a redirect URL to the authN/Z backend.
|
static OAuth2Auth |
create(Vertx vertx)
Create a OAuth2 auth provider
|
static OAuth2Auth |
create(Vertx vertx,
OAuth2ClientOptions config)
Create a OAuth2 auth provider
|
static OAuth2Auth |
create(Vertx vertx,
OAuth2FlowType flow)
Deprecated.
the flow configuration should be passed in the config object
|
static OAuth2Auth |
create(Vertx vertx,
OAuth2FlowType flow,
OAuth2ClientOptions config)
Deprecated.
the flow configuration should be passed in the config object
|
static OAuth2Auth |
createKeycloak(Vertx vertx,
OAuth2FlowType flow,
JsonObject config)
Deprecated.
You should use the provider helper
KeycloakAuth instead.
Create a OAuth2 auth provider |
OAuth2Auth |
decodeToken(String token,
Handler<AsyncResult<AccessToken>> handler)
Deprecated.
use
AuthProvider.authenticate(JsonObject, Handler) instead. |
OAuth2FlowType |
getFlowType()
Deprecated.
|
String |
getScopeSeparator()
Deprecated.
|
void |
getToken(JsonObject params,
Handler<AsyncResult<AccessToken>> handler)
Deprecated.
use
AuthProvider.authenticate(JsonObject, Handler) instead. |
default OAuth2Auth |
introspectToken(String token,
Handler<AsyncResult<AccessToken>> handler)
Deprecated.
|
OAuth2Auth |
introspectToken(String token,
String tokenType,
Handler<AsyncResult<AccessToken>> handler)
Deprecated.
|
OAuth2Auth |
loadJWK(Handler<AsyncResult<Void>> handler)
Deprecated.
|
OAuth2Auth |
missingKeyHandler(Handler<String> handler)
Handled to be called when a key (mentioned on a JWT) is missing from the current config.
|
OAuth2Auth |
rbacHandler(OAuth2RBAC rbac)
Deprecated.
|
authenticate
@Deprecated static OAuth2Auth createKeycloak(Vertx vertx, OAuth2FlowType flow, JsonObject config)
KeycloakAuth
instead.
Create a OAuth2 auth providervertx
- the Vertx instanceconfig
- the config as exported from the admin console@Deprecated static OAuth2Auth create(Vertx vertx, OAuth2FlowType flow, OAuth2ClientOptions config)
vertx
- the Vertx instanceconfig
- the config@Deprecated static OAuth2Auth create(Vertx vertx, OAuth2FlowType flow)
vertx
- the Vertx instancestatic OAuth2Auth create(Vertx vertx)
vertx
- the Vertx instancestatic OAuth2Auth create(Vertx vertx, OAuth2ClientOptions config)
vertx
- the Vertx instanceconfig
- the configString authorizeURL(JsonObject params)
@Deprecated void getToken(JsonObject params, Handler<AsyncResult<AccessToken>> handler)
AuthProvider.authenticate(JsonObject, Handler)
instead.params
- - JSON with the options, each flow requires different options.handler
- - The handler returning the results.@Deprecated OAuth2Auth decodeToken(String token, Handler<AsyncResult<AccessToken>> handler)
AuthProvider.authenticate(JsonObject, Handler)
instead.AccessToken
object. This is useful to handle bearer JWT tokens.token
- the access token (base64 string)handler
- A handler to receive the event@Deprecated default OAuth2Auth introspectToken(String token, Handler<AsyncResult<AccessToken>> handler)
token
- the access token (base64 string)handler
- A handler to receive the event@Deprecated OAuth2Auth introspectToken(String token, String tokenType, Handler<AsyncResult<AccessToken>> 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 String getScopeSeparator()
@Deprecated OAuth2FlowType getFlowType()
@Deprecated OAuth2Auth loadJWK(Handler<AsyncResult<Void>> handler)
@Deprecated OAuth2Auth rbacHandler(OAuth2RBAC rbac)
OAuth2Auth missingKeyHandler(Handler<String> handler)
loadJWK(Handler)
but being careful to implement
some rate limiting function.
This method isn't generic for several reasons. The provider is not aware of the capabilities
of the backend IdP in terms of max allowed API calls. Some validation could be done at the
key id, which only the end user is aware of.missingKeyHandler(Handler)
Copyright © 2023 Eclipse. All rights reserved.