protected PermifyRequest buildPermifyRequest(final RegisteredServiceAccessStrategyRequest request) {
        val expressionResolver = SpringExpressionLanguageValueResolver.getInstance();
        val entity = new PermifyEntity(
            StringUtils.defaultIfBlank(expressionResolver.resolve(this.entityType), "application"),
            String.valueOf(request.getRegisteredService().getId()));

        val subject = new PermifySubject(
            StringUtils.defaultIfBlank(expressionResolver.resolve(subjectType), "user"),
            request.getPrincipalId(),
            StringUtils.defaultIfBlank(expressionResolver.resolve(subjectRelation), "owner"));

        val context = new PermifyContext(Map.of(
            "service", request.getService().getId(),
            "attributes", request.getAttributes())
        );
        
        return new PermifyRequest(entity, expressionResolver.resolve(permission),
            subject, context, new PermifyMetadata(DEPTH));
    }
This is {@link PermifyRegisteredServiceAccessStrategy}.

@author Misagh Moayyed
@since 7.2.0
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/PermifyRegisteredServiceAccessStrategy.java