@Override
    public Principal createPrincipal(final String id, final Map<String, List<Object>> attributes) throws Throwable {
        return watchableScript.execute(new Object[]{id, attributes, LOGGER}, Principal.class);
    }
Factory to create {@link SimplePrincipal} objects.

@author Misagh Moayyed
@since 4.1.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/GroovyPrincipalFactory.java