@Override
    public int vote(final Authentication authentication, final ServerCall<?, ?> serverCall,
            final Collection<ConfigAttribute> attributes) {
        final AccessPredicateConfigAttribute attr = find(attributes);
        if (attr == null) {
            return ACCESS_ABSTAIN;
        }
        final boolean allowed = attr.getAccessPredicate().test(authentication, serverCall);
        return allowed ? ACCESS_GRANTED : ACCESS_DENIED;
    }
An {@link AccessDecisionVoter} that checks for {@link AccessPredicateConfigAttribute}s.

@author Daniel Theuke (daniel.theuke@aequitas-software.de)
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/security/check/AccessPredicateVoter.java