@Audit(action = AuditableActions.DELEGATED_CLIENT,
        actionResolverName = AuditActionResolvers.DELEGATED_CLIENT_ACTION_RESOLVER,
        resourceResolverName = AuditResourceResolvers.DELEGATED_CLIENT_RESOURCE_RESOLVER)
    @Override
    public AuditableExecutionResult execute(final AuditableContext context) {
        val result = AuditableExecutionResult.of(context);
        if (context.getRegisteredService().isPresent() && context.getProperties().containsKey(Client.class.getSimpleName())) {
            val registeredService = context.getRegisteredService().orElseThrow();
            val clientName = context.getProperties().get(Client.class.getSimpleName()).toString();
            LOGGER.trace("Checking delegated access strategy of [{}] for client [{}]", registeredService, clientName);
            val policy = registeredService.getAccessStrategy().getDelegatedAuthenticationPolicy();
            if (policy != null && !policy.isProviderAllowed(clientName, registeredService)) {
                LOGGER.debug("Delegated access strategy for [{}] does not permit client [{}]", registeredService, clientName);
                result.setException(UnauthorizedServiceException.denied(clientName));
            }
        }
        return result;
    }
This is {@link RegisteredServiceDelegatedAuthenticationPolicyAuditableEnforcer}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-pac4j-core/src/main/java/org/apereo/cas/validation/RegisteredServiceDelegatedAuthenticationPolicyAuditableEnforcer.java