@Test public void testHasAttributes_true() throws XSUserInfoException { assertThat(cut.hasAttributes()).isTrue(); }
@Override public boolean hasAttributes() { checkNotGrantTypeClientCredentials("hasAttributes"); if (accessToken.hasClaim(EXTERNAL_CONTEXT)) { JsonObject extContext = getClaimAsJsonObject(EXTERNAL_CONTEXT); return extContext != null && extContext.contains(XS_USER_ATTRIBUTES) && !extContext .getJsonObject(EXTERNAL_CONTEXT).isEmpty(); } else { JsonObject xsUserAttributes = getClaimAsJsonObject(XS_USER_ATTRIBUTES); return !(xsUserAttributes == null || xsUserAttributes.isEmpty()); } }
XSUserInfoAdapter implements XSUserInfo { @Override public boolean hasAttributes() { checkNotGrantTypeClientCredentials("hasAttributes"); if (accessToken.hasClaim(EXTERNAL_CONTEXT)) { JsonObject extContext = getClaimAsJsonObject(EXTERNAL_CONTEXT); return extContext != null && extContext.contains(XS_USER_ATTRIBUTES) && !extContext .getJsonObject(EXTERNAL_CONTEXT).isEmpty(); } else { JsonObject xsUserAttributes = getClaimAsJsonObject(XS_USER_ATTRIBUTES); return !(xsUserAttributes == null || xsUserAttributes.isEmpty()); } } }
XSUserInfoAdapter implements XSUserInfo { @Override public boolean hasAttributes() { checkNotGrantTypeClientCredentials("hasAttributes"); if (accessToken.hasClaim(EXTERNAL_CONTEXT)) { JsonObject extContext = getClaimAsJsonObject(EXTERNAL_CONTEXT); return extContext != null && extContext.contains(XS_USER_ATTRIBUTES) && !extContext .getJsonObject(EXTERNAL_CONTEXT).isEmpty(); } else { JsonObject xsUserAttributes = getClaimAsJsonObject(XS_USER_ATTRIBUTES); return !(xsUserAttributes == null || xsUserAttributes.isEmpty()); } } XSUserInfoAdapter(Object accessToken);  XSUserInfoAdapter(AccessToken accessToken);   XSUserInfoAdapter(Object accessToken, OAuth2ServiceConfiguration configuration); }
XSUserInfoAdapter implements XSUserInfo { @Override public boolean hasAttributes() { checkNotGrantTypeClientCredentials("hasAttributes"); if (accessToken.hasClaim(EXTERNAL_CONTEXT)) { JsonObject extContext = getClaimAsJsonObject(EXTERNAL_CONTEXT); return extContext != null && extContext.contains(XS_USER_ATTRIBUTES) && !extContext .getJsonObject(EXTERNAL_CONTEXT).isEmpty(); } else { JsonObject xsUserAttributes = getClaimAsJsonObject(XS_USER_ATTRIBUTES); return !(xsUserAttributes == null || xsUserAttributes.isEmpty()); } } XSUserInfoAdapter(Object accessToken);  XSUserInfoAdapter(AccessToken accessToken);   XSUserInfoAdapter(Object accessToken, OAuth2ServiceConfiguration configuration); @Override String getLogonName(); @Override String getGivenName(); @Override String getFamilyName(); @Override String getOrigin(); @Override String getIdentityZone(); @Override /** * "ext_attr": { "enhancer": "XSUAA", "subaccountid": "my-subaccount-1234" }, */ String getSubaccountId(); @Override String getZoneId(); @Override /** * "ext_attr": { "enhancer": "XSUAA", "zdn": "paas-subdomain" }, */ String getSubdomain(); @Override String getClientId(); @Override String getJsonValue(String attribute); @Override String getEmail(); @Override String getDBToken(); @Override String getHdbToken(); @Override String getAppToken(); @Override String getToken(String namespace, String name); @Override String[] getAttribute(String attributeName); @Override boolean hasAttributes(); @Override String[] getSystemAttribute(String attributeName); @Override boolean checkScope(String scope); @Override boolean checkLocalScope(String scope); @Override String getAdditionalAuthAttribute(String attributeName); @Override String getCloneServiceInstanceId(); @Override String getGrantType(); @Override boolean isInForeignMode(); @Override String requestTokenForClient(String clientId, String clientSecret, String baseUaaUrl); @Override String requestTokenForUser(String clientId, String clientSecret, String baseUaaUrl); @Override String requestToken(XSTokenRequest tokenRequest); }
XSUserInfoAdapter implements XSUserInfo { @Override public boolean hasAttributes() { checkNotGrantTypeClientCredentials("hasAttributes"); if (accessToken.hasClaim(EXTERNAL_CONTEXT)) { JsonObject extContext = getClaimAsJsonObject(EXTERNAL_CONTEXT); return extContext != null && extContext.contains(XS_USER_ATTRIBUTES) && !extContext .getJsonObject(EXTERNAL_CONTEXT).isEmpty(); } else { JsonObject xsUserAttributes = getClaimAsJsonObject(XS_USER_ATTRIBUTES); return !(xsUserAttributes == null || xsUserAttributes.isEmpty()); } } XSUserInfoAdapter(Object accessToken);  XSUserInfoAdapter(AccessToken accessToken);   XSUserInfoAdapter(Object accessToken, OAuth2ServiceConfiguration configuration); @Override String getLogonName(); @Override String getGivenName(); @Override String getFamilyName(); @Override String getOrigin(); @Override String getIdentityZone(); @Override /** * "ext_attr": { "enhancer": "XSUAA", "subaccountid": "my-subaccount-1234" }, */ String getSubaccountId(); @Override String getZoneId(); @Override /** * "ext_attr": { "enhancer": "XSUAA", "zdn": "paas-subdomain" }, */ String getSubdomain(); @Override String getClientId(); @Override String getJsonValue(String attribute); @Override String getEmail(); @Override String getDBToken(); @Override String getHdbToken(); @Override String getAppToken(); @Override String getToken(String namespace, String name); @Override String[] getAttribute(String attributeName); @Override boolean hasAttributes(); @Override String[] getSystemAttribute(String attributeName); @Override boolean checkScope(String scope); @Override boolean checkLocalScope(String scope); @Override String getAdditionalAuthAttribute(String attributeName); @Override String getCloneServiceInstanceId(); @Override String getGrantType(); @Override boolean isInForeignMode(); @Override String requestTokenForClient(String clientId, String clientSecret, String baseUaaUrl); @Override String requestTokenForUser(String clientId, String clientSecret, String baseUaaUrl); @Override String requestToken(XSTokenRequest tokenRequest);  }