public String generate(long maxAge) {

        // Sweep expired nonces if enough time has passed
        sweepExpiredNonces();

        // Generate and store nonce, along with expiration timestamp
        String nonce = IdentifierGenerator.generateIdentifier(NONCE_BITS, false);
        nonces.put(nonce, System.currentTimeMillis() + maxAge);
        return nonce;

    }
Generates a cryptographically-secure nonce value. The nonce is intended
to be used to prevent replay attacks.

@param maxAge
    The maximum amount of time that the generated nonce should remain
    valid, in milliseconds.

@return
    A cryptographically-secure nonce value. Generated nonces are at
    least 128-bit and are case-insensitive.
extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/NonceService.java