Search in sources :

Example 1 with AuthorizationPolicyType

use of org.xdi.model.custom.script.type.uma.AuthorizationPolicyType in project oxAuth by GluuFederation.

the class ExternalUmaAuthorizationPolicyService method executeExternalAuthorizeMethod.

public boolean executeExternalAuthorizeMethod(CustomScriptConfiguration customScriptConfiguration, AuthorizationContext authorizationContext) {
    try {
        log.debug("Executing python 'authorize' method");
        AuthorizationPolicyType externalType = (AuthorizationPolicyType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.authorize(authorizationContext, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : AuthorizationPolicyType(org.xdi.model.custom.script.type.uma.AuthorizationPolicyType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Aggregations

SimpleCustomProperty (org.xdi.model.SimpleCustomProperty)1 AuthorizationPolicyType (org.xdi.model.custom.script.type.uma.AuthorizationPolicyType)1