public class XSUserInfoAdapter extends Object implements XSUserInfo
XSUserInfo interface by wrapping and
delegating calls to an AccessToken.
Other implementations of XSUserInfo support loading the token from
the the spring security context holder. This is not supported by this class!
It also does not support the SAPAuthorizationExtension.| Constructor and Description |
|---|
XSUserInfoAdapter(AccessToken accessToken) |
XSUserInfoAdapter(Object accessToken) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkLocalScope(String scope) |
boolean |
checkScope(String scope) |
String |
getAdditionalAuthAttribute(String attributeName) |
String |
getAppToken() |
String[] |
getAttribute(String attributeName) |
String |
getClientId() |
String |
getCloneServiceInstanceId() |
String |
getDBToken() |
String |
getEmail() |
String |
getFamilyName() |
String |
getGivenName() |
String |
getGrantType() |
String |
getHdbToken() |
String |
getIdentityZone() |
String |
getJsonValue(String attribute) |
String |
getLogonName()
Loading the token from the security context like this is not supported!
XSUserInfoAdapter() { Authentication auth =
SecurityContextHolder.getContext().getAuthentication(); if (auth instanceof
OAuth2Authentication) { SAPAuthorizationExtension extension =
(SAPAuthorizationExtension) ((OAuth2Authentication)
auth).getOAuth2Request().getExtensions().get("sap"); if (extension != null) {
this.foreignMode = extension.isForeignMode(); } } }
|
String |
getOrigin() |
String |
getSubaccountId() |
String |
getSubdomain() |
String[] |
getSystemAttribute(String attributeName) |
String |
getToken(String namespace,
String name) |
String |
getZoneId() |
boolean |
hasAttributes() |
boolean |
isInForeignMode()
Check if a token issued for another OAuth client has been forwarded to a
different client,
This method does not support checking if the token can be accepted by ACL.
|
String |
requestToken(XSTokenRequest tokenRequest) |
String |
requestTokenForClient(String clientId,
String clientSecret,
String baseUaaUrl) |
String |
requestTokenForUser(String clientId,
String clientSecret,
String baseUaaUrl) |
public XSUserInfoAdapter(Object accessToken)
public XSUserInfoAdapter(AccessToken accessToken)
public String getLogonName()
getLogonName in interface XSUserInfopublic String getGivenName()
getGivenName in interface XSUserInfopublic String getFamilyName()
getFamilyName in interface XSUserInfopublic String getOrigin()
getOrigin in interface XSUserInfopublic String getIdentityZone()
getIdentityZone in interface XSUserInfopublic String getSubaccountId()
getSubaccountId in interface XSUserInfopublic String getZoneId()
getZoneId in interface XSUserInfopublic String getSubdomain()
getSubdomain in interface XSUserInfopublic String getClientId()
getClientId in interface XSUserInfopublic String getJsonValue(String attribute)
getJsonValue in interface XSUserInfopublic String getEmail()
getEmail in interface XSUserInfopublic String getDBToken()
getDBToken in interface XSUserInfopublic String getHdbToken()
getHdbToken in interface XSUserInfopublic String getAppToken()
getAppToken in interface XSUserInfopublic String getToken(String namespace, String name)
getToken in interface XSUserInfopublic String[] getAttribute(String attributeName)
getAttribute in interface XSUserInfopublic boolean hasAttributes()
hasAttributes in interface XSUserInfopublic String[] getSystemAttribute(String attributeName)
getSystemAttribute in interface XSUserInfopublic boolean checkScope(String scope)
checkScope in interface XSUserInfopublic boolean checkLocalScope(String scope)
checkLocalScope in interface XSUserInfopublic String getAdditionalAuthAttribute(String attributeName)
getAdditionalAuthAttribute in interface XSUserInfopublic String getCloneServiceInstanceId()
getCloneServiceInstanceId in interface XSUserInfopublic String getGrantType()
getGrantType in interface XSUserInfopublic boolean isInForeignMode()
isInForeignMode in interface XSUserInfopublic String requestTokenForClient(String clientId, String clientSecret, String baseUaaUrl)
requestTokenForClient in interface XSUserInfopublic String requestTokenForUser(String clientId, String clientSecret, String baseUaaUrl)
requestTokenForUser in interface XSUserInfopublic String requestToken(XSTokenRequest tokenRequest)
requestToken in interface XSUserInfoCopyright © 2020. All rights reserved.