public class OAuth2TokenImpl extends OAuth2UserImpl
accessToken, idToken, refreshToken| Constructor and Description |
|---|
OAuth2TokenImpl()
Creates an AccessToken instance.
|
OAuth2TokenImpl(OAuth2Auth provider,
JsonObject token)
Creates an AccessToken instance.
|
| Modifier and Type | Method and Description |
|---|---|
AccessToken |
fetch(HttpMethod method,
String resource,
JsonObject headers,
Buffer payload,
Handler<AsyncResult<OAuth2Response>> callback)
Fetches a JSON resource using this Access Token.
|
AccessToken |
introspect(Handler<AsyncResult<Void>> handler)
Introspect access token.
|
AccessToken |
introspect(String tokenType,
Handler<AsyncResult<Void>> handler)
Introspect access token.
|
OAuth2TokenImpl |
logout(Handler<AsyncResult<Void>> callback)
Revoke refresh token and calls the logout endpoint
|
OAuth2TokenImpl |
refresh(Handler<AsyncResult<Void>> handler)
Refresh the access token
|
OAuth2TokenImpl |
revoke(String token_type,
Handler<AsyncResult<Void>> handler)
Revoke access or refresh token
|
AccessToken |
setTrustJWT(boolean trust) |
String |
tokenType() |
AccessToken |
userInfo(Handler<AsyncResult<JsonObject>> callback)
Load the user info as per OIDC spec.
|
accessToken, decodeToken, decodeToken, doIsPermitted, expired, getProvider, idToken, init, opaqueAccessToken, opaqueIdToken, opaqueRefreshToken, principal, readFromBuffer, refreshToken, setAuthProvider, writeToBuffercachePermission, clearCache, isAuthorizedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfetchclearCache, isAuthorised, isAuthorizedpublic OAuth2TokenImpl()
public OAuth2TokenImpl(OAuth2Auth provider, JsonObject token)
token - - An object containing the token object returned from the OAuth2 server.public AccessToken setTrustJWT(boolean trust)
public String tokenType()
public OAuth2TokenImpl refresh(Handler<AsyncResult<Void>> handler)
handler - - The callback function returning the results.public OAuth2TokenImpl revoke(String token_type, Handler<AsyncResult<Void>> handler)
token_type - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".handler - - The callback function returning the results.public OAuth2TokenImpl logout(Handler<AsyncResult<Void>> callback)
callback - - The callback function returning the results.public AccessToken introspect(String tokenType, Handler<AsyncResult<Void>> handler)
AccessTokentokenType - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".handler - - The callback function returning the results.public AccessToken introspect(Handler<AsyncResult<Void>> handler)
AccessTokenhandler - - The callback function returning the results.public AccessToken userInfo(Handler<AsyncResult<JsonObject>> callback)
AccessTokencallback - - The callback function returning the results.public AccessToken fetch(HttpMethod method, String resource, JsonObject headers, Buffer payload, Handler<AsyncResult<OAuth2Response>> callback)
AccessTokenmethod - - the HTTP method to user.resource - - the resource to fetch.headers - - extra headers to pass to the request.payload - - payload to send to the server.callback - - The callback function returning the results.Copyright © 2020. All rights reserved.