public class AccessTokenImpl extends UserImpl implements AccessToken
| Constructor and Description |
|---|
AccessTokenImpl() |
AccessTokenImpl(JsonObject principal,
OAuth2Auth oAuth2Auth) |
| Modifier and Type | Method and Description |
|---|---|
JsonObject |
accessToken()
The Access Token if present parsed as a JsonObject
|
AccessToken |
fetch(HttpMethod method,
String resource,
JsonObject headers,
Buffer payload,
Handler<AsyncResult<OAuth2Response>> callback)
Fetches a JSON resource using this Access Token.
|
JsonObject |
idToken()
The Id Token if present parsed as a JsonObject
|
AccessToken |
introspect(Handler<AsyncResult<Void>> callback)
Introspect access token.
|
AccessToken |
introspect(String tokenType,
Handler<AsyncResult<Void>> callback)
Introspect access token.
|
boolean |
isScopeGranted()
Check if the access token own the required scopes to access to the resource.
|
AccessToken |
logout(Handler<AsyncResult<Void>> callback)
Revoke refresh token and calls the logout endpoint.
|
String |
opaqueAccessToken()
The RAW String if available for the Access Token
|
String |
opaqueIdToken()
The RAW String if available for the Id Token
|
String |
opaqueRefreshToken()
The RAW String if available for the Refresh Token
|
AccessToken |
refresh(Handler<AsyncResult<Void>> callback)
Refresh the access token
|
AccessToken |
revoke(String token_type,
Handler<AsyncResult<Void>> callback)
Revoke access or refresh token
|
void |
setAuthProvider(AuthProvider authProvider)
Set the auth provider for the User.
|
AccessToken |
setTrustJWT(boolean trust) |
String |
tokenType() |
AccessToken |
userInfo(Handler<AsyncResult<JsonObject>> callback)
Load the user info as per OIDC spec.
|
attributes, authorizations, equals, hashCode, isAuthorized, principal, readFromBuffer, writeToBufferclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitfetch, fetch, fetch, introspect, introspect, logout, refresh, revoke, userInfoattributes, authorizations, clearCache, containsKey, create, create, expired, expired, fromName, fromToken, get, isAuthorized, isAuthorized, isAuthorized, isAuthorized, principalpublic AccessTokenImpl()
public AccessTokenImpl(JsonObject principal, OAuth2Auth oAuth2Auth)
public void setAuthProvider(AuthProvider authProvider)
UsersetAuthProvider in interface UsersetAuthProvider in class UserImplauthProvider - the AuthProvider - this must be the same type of AuthProvider that originally created the Userpublic boolean isScopeGranted()
AccessTokenisScopeGranted in interface AccessTokenpublic JsonObject accessToken()
AccessTokenaccessToken in interface AccessTokenpublic JsonObject idToken()
AccessTokenidToken in interface AccessTokenpublic String opaqueAccessToken()
AccessTokenopaqueAccessToken in interface AccessTokenpublic String opaqueRefreshToken()
AccessTokenopaqueRefreshToken in interface AccessTokenpublic String opaqueIdToken()
AccessTokenopaqueIdToken in interface AccessTokenpublic String tokenType()
tokenType in interface AccessTokenpublic AccessToken setTrustJWT(boolean trust)
setTrustJWT in interface AccessTokenpublic AccessToken refresh(Handler<AsyncResult<Void>> callback)
AccessTokenrefresh in interface AccessTokencallback - - The callback function returning the results.public AccessToken revoke(String token_type, Handler<AsyncResult<Void>> callback)
AccessTokenrevoke in interface AccessTokentoken_type - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".callback - - The callback function returning the results.public AccessToken logout(Handler<AsyncResult<Void>> callback)
AccessTokenlogout in interface AccessTokencallback - - The callback function returning the results.public AccessToken introspect(Handler<AsyncResult<Void>> callback)
AccessTokenintrospect in interface AccessTokencallback - - The callback function returning the results.public AccessToken introspect(String tokenType, Handler<AsyncResult<Void>> callback)
AccessTokenintrospect in interface AccessTokentokenType - - A String containing the type of token to revoke. Should be either "access_token" or "refresh_token".callback - - The callback function returning the results.public AccessToken userInfo(Handler<AsyncResult<JsonObject>> callback)
AccessTokenuserInfo in interface AccessTokencallback - - The callback function returning the results.public AccessToken fetch(HttpMethod method, String resource, JsonObject headers, Buffer payload, Handler<AsyncResult<OAuth2Response>> callback)
AccessTokenfetch in interface 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 © 2021. All rights reserved.