protected Principal resolvedPrincipal(final String username) throws Throwable {
        val resolvedPrincipal = principalResolver.resolve(new BasicIdentifiableCredential(username));
        return resolvedPrincipal instanceof NullPrincipal
            ? PrincipalFactoryUtils.newPrincipalFactory().createPrincipal(username)
            : resolvedPrincipal;
    }
This is {@link SurrogateServiceTicketGeneratorAuthority}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-surrogate-core/src/main/java/org/apereo/cas/ticket/SurrogateServiceTicketGeneratorAuthority.java