@Test public void getXsUserAttributeValues() { Token token = new XsuaaToken(jwtSaml); String[] userAttrValues = token.getXSUserAttribute("cost-center"); assertThat(userAttrValues.length, is(2)); assertThat(userAttrValues[0], is("0815")); assertThat(userAttrValues[1], is("4711")); }
@Nullable @Override public String[] getXSUserAttribute(String attributeName) { String[] attributeValue = getStringListAttributeFromClaim(attributeName, CLAIM_EXTERNAL_CONTEXT); return attributeValue != null ? attributeValue : getStringListAttributeFromClaim(attributeName, TokenClaims.CLAIM_XS_USER_ATTRIBUTES); }
XsuaaToken extends Jwt implements Token { @Nullable @Override public String[] getXSUserAttribute(String attributeName) { String[] attributeValue = getStringListAttributeFromClaim(attributeName, CLAIM_EXTERNAL_CONTEXT); return attributeValue != null ? attributeValue : getStringListAttributeFromClaim(attributeName, TokenClaims.CLAIM_XS_USER_ATTRIBUTES); } }
XsuaaToken extends Jwt implements Token { @Nullable @Override public String[] getXSUserAttribute(String attributeName) { String[] attributeValue = getStringListAttributeFromClaim(attributeName, CLAIM_EXTERNAL_CONTEXT); return attributeValue != null ? attributeValue : getStringListAttributeFromClaim(attributeName, TokenClaims.CLAIM_XS_USER_ATTRIBUTES); } protected  XsuaaToken(Jwt jwt); }
XsuaaToken extends Jwt implements Token { @Nullable @Override public String[] getXSUserAttribute(String attributeName) { String[] attributeValue = getStringListAttributeFromClaim(attributeName, CLAIM_EXTERNAL_CONTEXT); return attributeValue != null ? attributeValue : getStringListAttributeFromClaim(attributeName, TokenClaims.CLAIM_XS_USER_ATTRIBUTES); } protected  XsuaaToken(Jwt jwt); @Override Collection<? extends GrantedAuthority> getAuthorities(); @Override Date getExpirationDate(); @Override Instant getExpiration(); @Override String getPassword(); @Override String getUsername(); @Override boolean isAccountNonExpired(); @Override boolean isAccountNonLocked(); @Override boolean isCredentialsNonExpired(); @Override boolean isEnabled(); @Nullable static String getUniquePrincipalName(String origin, String userLoginName); @Override @Nullable String getLogonName(); @Override @Nullable String getClientId(); @Override String getGivenName(); @Override @Nullable String getFamilyName(); @Override String getEmail(); @Override String getOrigin(); @Override String getGrantType(); @Override String getSubaccountId(); @Override String getZoneId(); @Override String getSubdomain(); @Override String toString(); @Nullable @Override String[] getXSUserAttribute(String attributeName); @Override String getAdditionalAuthAttribute(String attributeName); @Override String getCloneServiceInstanceId(); @Override String getAppToken(); @Override Collection<String> getScopes(); boolean hasClaim(String claim); }
XsuaaToken extends Jwt implements Token { @Nullable @Override public String[] getXSUserAttribute(String attributeName) { String[] attributeValue = getStringListAttributeFromClaim(attributeName, CLAIM_EXTERNAL_CONTEXT); return attributeValue != null ? attributeValue : getStringListAttributeFromClaim(attributeName, TokenClaims.CLAIM_XS_USER_ATTRIBUTES); } protected  XsuaaToken(Jwt jwt); @Override Collection<? extends GrantedAuthority> getAuthorities(); @Override Date getExpirationDate(); @Override Instant getExpiration(); @Override String getPassword(); @Override String getUsername(); @Override boolean isAccountNonExpired(); @Override boolean isAccountNonLocked(); @Override boolean isCredentialsNonExpired(); @Override boolean isEnabled(); @Nullable static String getUniquePrincipalName(String origin, String userLoginName); @Override @Nullable String getLogonName(); @Override @Nullable String getClientId(); @Override String getGivenName(); @Override @Nullable String getFamilyName(); @Override String getEmail(); @Override String getOrigin(); @Override String getGrantType(); @Override String getSubaccountId(); @Override String getZoneId(); @Override String getSubdomain(); @Override String toString(); @Nullable @Override String[] getXSUserAttribute(String attributeName); @Override String getAdditionalAuthAttribute(String attributeName); @Override String getCloneServiceInstanceId(); @Override String getAppToken(); @Override Collection<String> getScopes(); boolean hasClaim(String claim);  }