Package com.sap.cds.feature.xsuaa
Interface XsuaaUserInfo
- All Superinterfaces:
UserInfo
This interface extends the common
UserInfo
with XSUAA specific getters.
Given a UserInfo
instance userInfo
you can obtain an instance of XsuaaUserInfo
by calling userInfo.as(XsuaaUserInfo.class)
.
-
Method Summary
Modifier and TypeMethodDescriptiongetEmail()
Returns the email of the user if present.Returns the family name of the user if present.Returns the given name of the user if present.Returns the user origin. i.e. the user store the user comes from.Returns the subdomain of the user's tenant.Methods inherited from interface com.sap.cds.services.request.UserInfo
as, copy, getAdditionalAttribute, getAdditionalAttributes, getAttributes, getAttributeValues, getId, getName, getRoles, getTenant, hasRole, isAuthenticated, isInternalUser, isPrivileged, isSystemUser
-
Method Details
-
getEmail
String getEmail()Returns the email of the user if present.- Returns:
- The email if present.
-
getOrigin
String getOrigin()Returns the user origin. i.e. the user store the user comes from. Platform users have origin "uaa".Might be
null
in case this JWT was not created with OAuth 2.0 client credentials flow.- Returns:
- the user origin if present.
-
getGivenName
String getGivenName()Returns the given name of the user if present.ext_attr.given_name
claim takes precedence beforegiven_name
claim.- Returns:
- the given name if present.
-
getFamilyName
String getFamilyName()Returns the family name of the user if present.ext_attr.family_name
claim takes precedence beforefamily_name
claim.- Returns:
- the given name if present.
-
getSubDomain
String getSubDomain()Returns the subdomain of the user's tenant.- Returns:
- the subdomain of the tenant.
-