public static PrincipalFactory newGroovyPrincipalFactory(final Resource resource) {
        return new GroovyPrincipalFactory(resource);
    }
New principal factory.

@param resource the resource
@return the principal factory
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/PrincipalFactoryUtils.java