public class XsuaaToken extends AbstractToken implements AccessToken
jwtToken, tokenBody, tokenHeader| Constructor and Description |
|---|
XsuaaToken(DecodedJwt decodedJwt)
Creates an instance.
|
XsuaaToken(String accessToken)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
GrantType |
getGrantType()
Returns the grant type of the jwt token.
|
Principal |
getPrincipal()
Returns a principal, which can be used to represent any entity, such as an
individual, a corporation, and a login id.
|
Set<String> |
getScopes()
Returns the list of the claim "scope".
|
Service |
getService()
Returns the identity service, the token is issued by.
|
boolean |
hasLocalScope(String scope)
Check if a local scope is available in the authentication token.
|
boolean |
hasScope(String scope)
Checks if a scope is available in the access token.
|
XsuaaToken |
withScopeConverter(ScopeConverter converter)
Configures a scope converter, e.g.
|
createPrincipalByName, equals, getAudiences, getClaimAsJsonObject, getClaimAsString, getClaimAsStringList, getExpiration, getHeaderParameterAsString, getNotBefore, getTokenValue, hasClaim, hashCode, hasHeaderParameter, isExpiredclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAudiences, getClaimAsJsonObject, getClaimAsString, getClaimAsStringList, getExpiration, getHeaderParameterAsString, getNotBefore, getTokenValue, hasClaim, hasHeaderParameter, isExpiredpublic XsuaaToken(@Nonnull DecodedJwt decodedJwt)
decodedJwt - the decoded jwtpublic XsuaaToken withScopeConverter(@Nullable ScopeConverter converter)
hasLocalScope(String)converter - the scope converter, e.g. XsuaaScopeConverterpublic Set<String> getScopes()
AccessTokengetScopes in interface AccessTokenpublic Principal getPrincipal()
TokengetPrincipal in interface Tokenpublic Service getService()
TokengetService in interface Tokenpublic boolean hasScope(String scope)
AccessTokenhasScope in interface AccessTokenscope - name of the scopepublic boolean hasLocalScope(@Nonnull String scope)
ScopeConverter to be configured with
withScopeConverter(ScopeConverter).hasLocalScope in interface AccessTokenscope - name of local scope (without the appId)public GrantType getGrantType()
AccessTokengetGrantType in interface AccessTokenCopyright © 2020. All rights reserved.