@Override
    public Principal resolve(final Credential credential,
                             final Optional<Principal> currentPrincipal,
                             final Optional<AuthenticationHandler> handler,
                             final Optional<Service> service) throws Throwable {
        val id = currentPrincipal.map(Principal::getId).orElseGet(credential::getId);
        val attributes = CollectionUtils.<String, List<Object>>wrap(
            HttpBasedServiceCredential.class.getName(), CollectionUtils.wrapList(credential.getId()));
        credential.getCredentialMetadata().putProperty(HttpBasedServiceCredential.class.getName(), credential.getId());
        return principalFactory.createPrincipal(id, attributes);
    }
Provides the most basic means of principal resolution.
@author Marvin S. Addison
@since 4.0.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/resolvers/ProxyingPrincipalResolver.java