public static <T extends AccessToken> String getClaim(T token, String claim) {
        if (claim == null || token == null) {
            return null;
        }
        // Get the standard claim field, if available
        if (STANDARD_CLAIMS_FIELD_MAP.containsKey(claim)) {
            return callClaimChain(token, STANDARD_CLAIMS_FIELD_MAP.get(claim));
        } else { // Otherwise, look up 'other claims'
            Object otherClaim = getOtherClaimValue(token, claim);
            return otherClaim == null ? null : otherClaim.toString();
        }
    }
Get a claim by name.

@param token token to retrieve claim from
@param claim the claim (field key)
@return string representation of claim
plugins/keycloak-oauth-policy/src/main/java/io/apiman/plugins/keycloak_oauth_policy/ClaimLookup.java