@ShellMethod(key = "generate-anonymous-user", value = "Generate an anonymous (persistent) username identifier")
    public String generateUsername(
        @ShellOption(value = { "username", "--username" },
            help = "Authenticated username") final String username,
        @ShellOption(value = { "service", "--service" },
            help = "Service application URL for which CAS may generate the identifier") final String service,
        @ShellOption(value = { "salt", "--salt" },
            help = "Salt used to generate and encode the anonymous identifier") final String salt) {
        val generator = new ShibbolethCompatiblePersistentIdGenerator(salt);
        val id = generator.generate(username, service);
        LOGGER.info("Generated identifier:\n[{}]", id);
        return id;
    }
Generate username.

@param username the username
@param service  the service
@param salt     the salt
@return the string
support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/services/AnonymousUsernameAttributeProviderCommand.java