public boolean add(UserData data, byte[] signature) {

        // Expiration timestamps must be provided
        if (data.getExpires() == null) {
            logger.warn("An expiration timestamp MUST be provided for "
                    + "single-use data.");
            return false;
        }

        // Remove any expired entries
        removeExpired();

        // Expired user data is implicitly denylisted
        if (data.isExpired())
            return false;

        // Add to denylist only if not already present
        String signatureHex = BaseEncoding.base16().encode(signature);
        return denylist.putIfAbsent(signatureHex, data) == null;

    }
Adds the given UserData to the denylist, storing it according to the
provided cryptographic signature. The UserData MUST have an associated
expiration timestamp. If any UserData objects already within the
denylist have expired, they will automatically be removed when this
function is invoked.

@param data
    The UserData to store within the denylist.

@param signature
    The cryptographic signature associated with the UserData.

@return
    true if the UserData was not already denylisted and has
    successfully been added, false otherwise.
extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/user/UserDataDenylist.java