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.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, getUnrestrictedAttributes, hasRole, isAuthenticated, isInternalUser, isPrivileged, isSystemUser, isUnrestrictedAttribute
-
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
nullin 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_nameclaim takes precedence beforegiven_nameclaim.- Returns:
- the given name if present.
-
getFamilyName
String getFamilyName()Returns the family name of the user if present.ext_attr.family_nameclaim takes precedence beforefamily_nameclaim.- Returns:
- the given name if present.
-
getSubDomain
String getSubDomain()Returns the subdomain of the user's tenant.- Returns:
- the subdomain of the tenant.
-