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;
}
Aggregations