public void setProfileFactoryWhenNotAuthenticated(final ProfileFactory profileFactoryWhenNotAuthenticated) {
        if (!warned) {
            logger.warn("Be careful when using the 'setProfileFactoryWhenNotAuthenticated' method: a custom profile "
                + "is returned when the authentication fails or is cancelled and it is stored for the whole session. "
                + "You may need to define additional 'Authorizer's to secure your web resources.");
            warned = true;
        }
        this.profileFactoryWhenNotAuthenticated = profileFactoryWhenNotAuthenticated;
    }
<p>Setter for the field <code>profileFactoryWhenNotAuthenticated</code>.</p>

@param profileFactoryWhenNotAuthenticated a {@link ProfileFactory} object
pac4j-core/src/main/java/org/pac4j/core/client/BaseClient.java