public interface OAuth2Auth extends AuthenticationProvider
AuthenticationProvider
instances.Modifier and Type | Method and Description |
---|---|
String |
authorizeURL(JsonObject params)
The client sends the end-user's browser to this endpoint to request their
authentication and consent.
|
static OAuth2Auth |
create(Vertx vertx)
Create a OAuth2 auth provider
|
static OAuth2Auth |
create(Vertx vertx,
OAuth2Options config)
Create a OAuth2 auth provider
|
default Future<AccessToken> |
decodeToken(String token)
Deprecated.
|
OAuth2Auth |
decodeToken(String token,
Handler<AsyncResult<AccessToken>> handler)
Deprecated.
|
default String |
endSessionURL(User user)
The logout (end-session) endpoint is specified in OpenID Connect Session Management 1.0.
|
String |
endSessionURL(User user,
JsonObject params)
The logout (end-session) endpoint is specified in OpenID Connect Session Management 1.0.
|
OAuth2FlowType |
getFlowType()
Deprecated.
|
default Future<AccessToken> |
introspectToken(String token)
Deprecated.
|
default OAuth2Auth |
introspectToken(String token,
Handler<AsyncResult<AccessToken>> handler)
Deprecated.
|
default Future<AccessToken> |
introspectToken(String token,
String tokenType)
Deprecated.
|
OAuth2Auth |
introspectToken(String token,
String tokenType,
Handler<AsyncResult<AccessToken>> handler)
Deprecated.
|
default Future<Void> |
jWKSet()
Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
of issued ID and access tokens.
|
OAuth2Auth |
jWKSet(Handler<AsyncResult<Void>> handler)
Retrieve the public server JSON Web Key (JWK) required to verify the authenticity
of issued ID and access tokens.
|
default Future<Void> |
loadJWK()
Deprecated.
Use
jWKSet() |
default OAuth2Auth |
loadJWK(Handler<AsyncResult<Void>> handler)
Deprecated.
Use
jWKSet(Handler) |
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.
|
default Future<User> |
refresh(User user)
Refresh the current User (access token).
|
OAuth2Auth |
refresh(User user,
Handler<AsyncResult<User>> handler)
Refresh the current User (access token).
|
default Future<Void> |
revoke(User user)
Revoke an obtained access token.
|
default OAuth2Auth |
revoke(User user,
Handler<AsyncResult<Void>> handler)
Revoke an obtained access token.
|
default Future<Void> |
revoke(User user,
String tokenType)
Revoke an obtained access or refresh token.
|
OAuth2Auth |
revoke(User user,
String tokenType,
Handler<AsyncResult<Void>> handler)
Revoke an obtained access or refresh token.
|
default Future<JsonObject> |
userInfo(User user)
Retrieve profile information and other attributes for a logged-in end-user.
|
OAuth2Auth |
userInfo(User user,
Handler<AsyncResult<JsonObject>> handler)
Retrieve profile information and other attributes for a logged-in end-user.
|
authenticate, authenticate, authenticate, authenticate
static OAuth2Auth create(Vertx vertx)
vertx
- the Vertx instancestatic OAuth2Auth create(Vertx vertx, OAuth2Options config)
vertx
- the Vertx instanceconfig
- the configOAuth2Auth jWKSet(Handler<AsyncResult<Void>> handler)
handler
- the handler success/failure.default Future<Void> jWKSet()
jWKSet(Handler)
OAuth2Auth missingKeyHandler(Handler<String> handler)
jWKSet(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)
String authorizeURL(JsonObject params)
params
- extra params to be included in the final URL.OAuth2Auth refresh(User user, Handler<AsyncResult<User>> handler)
user
- the user (access token) to be refreshed.handler
- the handler success/failure.default Future<User> refresh(User user)
user
- the user (access token) to be refreshed.userInfo(User, Handler)
OAuth2Auth revoke(User user, String tokenType, Handler<AsyncResult<Void>> handler)
user
- the user (access token) to revoke.tokenType
- the token type (either access_token or refresh_token).handler
- the handler success/failure.default OAuth2Auth revoke(User user, Handler<AsyncResult<Void>> handler)
user
- the user (access token) to revoke.handler
- the handler success/failure.default Future<Void> revoke(User user, String tokenType)
user
- the user (access token) to revoke.tokenType
- the token type (either access_token or refresh_token).revoke(User, String, Handler)
default Future<Void> revoke(User user)
user
- the user (access token) to revoke.revoke(User, Handler)
OAuth2Auth userInfo(User user, Handler<AsyncResult<JsonObject>> handler)
user
- the user (access token) to fetch the user info.handler
- the handler success/failure.default Future<JsonObject> userInfo(User user)
user
- the user (access token) to fetch the user info.userInfo(User, Handler)
String endSessionURL(User user, JsonObject params)
user
- the user to generate the url forparams
- extra parameters to apply to the urldefault String endSessionURL(User user)
user
- the user to generate the url for@Deprecated 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 default Future<AccessToken> decodeToken(String token)
AccessToken
object. This is useful to handle bearer JWT tokens.token
- the access token (base64 string)decodeToken(String, Handler)
@Deprecated default OAuth2Auth introspectToken(String token, Handler<AsyncResult<AccessToken>> handler)
token
- the access token (base64 string)handler
- A handler to receive the event@Deprecated default Future<AccessToken> introspectToken(String token)
token
- the access token (base64 string)introspectToken(String, Handler)
@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 default Future<AccessToken> introspectToken(String token, String tokenType)
token
- the access token (base64 string)tokenType
- hint to the token type e.g.: `access_token`@Deprecated OAuth2FlowType getFlowType()
@Deprecated default OAuth2Auth loadJWK(Handler<AsyncResult<Void>> handler)
jWKSet(Handler)
@Deprecated default Future<Void> loadJWK()
jWKSet()
loadJWK(Handler)
@Deprecated OAuth2Auth rbacHandler(OAuth2RBAC rbac)
Copyright © 2021 Eclipse. All rights reserved.