@Override
    public Principal resolve(final Credential credential, final Optional<Principal> principal,
                             final Optional<AuthenticationHandler> handler, final Optional<Service> service) throws Throwable {
        LOGGER.debug("Echoing back the authenticated principal [{}]", principal);
        return principal.orElse(null);
    }
This is {@link EchoingPrincipalResolver}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/resolvers/EchoingPrincipalResolver.java