![JAR search and dependency download from the Maven repository](/logo.png)
org.cloudfoundry.identity.uaa.oauth.AuthorizationAttributesParser Maven / Gradle / Ivy
package org.cloudfoundry.identity.uaa.oauth;
import com.fasterxml.jackson.core.type.TypeReference;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.cloudfoundry.identity.uaa.util.JsonUtils;
import org.springframework.util.StringUtils;
import java.util.Map;
public class AuthorizationAttributesParser {
private final Log logger = LogFactory.getLog(getClass());
/**
* This method searches the authorities in the request for
* additionalAuthorizationAttributes
* and returns a map of these attributes that will later be added to the
* token
*
* @param authoritiesJson
* @return
*/
public Map getAdditionalAuthorizationAttributes(String authoritiesJson) {
if (StringUtils.hasLength(authoritiesJson)) {
try {
Map authorities = JsonUtils.readValue(authoritiesJson, new TypeReference
© 2015 - 2025 Weber Informatics LLC | Privacy Policy