public static void verifyTimeRestrictions(Restrictable restrictable) throws GuacamoleException {
        
        // Verify time-based restrictions specific to this connection.
        String allowedTimeString = restrictable.getAttributes().get(Restrictable.RESTRICT_TIME_ALLOWED_ATTRIBUTE_NAME);
        String deniedTimeString = restrictable.getAttributes().get(Restrictable.RESTRICT_TIME_DENIED_ATTRIBUTE_NAME);
        RestrictionType timeRestriction = allowedByTimeRestrictions(allowedTimeString, deniedTimeString);
        if (!timeRestriction.isAllowed())
            throw new TranslatableGuacamoleSecurityException(
                    "Use of this connection or connection group is not allowed at this time.", 
                    "RESTRICT.ERROR_CONNECTION_NOT_ALLOWED_NOW"
            );
        
    }
Verify the time restrictions for the given Connection object, throwing
an exception if the connection should not be allowed, or silently
returning if the connection should be allowed.

@param restrictable
    The item that supports restrictions that is to be verified against
    the current time.

@throws GuacamoleException 
    If the connection should not be allowed at the current time.
extensions/guacamole-auth-restrict/src/main/java/org/apache/guacamole/auth/restrict/RestrictionVerificationService.java