<commit_before>(ns com.sixsq.slipstream.auth.utils.timestamp
  "Utilities for creating expiration times for token claims and for formatting
   them correctly for the cookie 'expires' field."
  (:require
    [clj-time.core :as t]
    [clj-time.coerce :as c]
    [clj-time.format :as f]))

;; FIXME: Reduce this time to a resonable value.
(def default-lifetime-minutes (* 7 24 60))                  ;; 1 week

(def cookie-date-formatter (f/formatter "EEE, dd MMM yyyy HH:mm:ss z"))

(defn format-timestamp
  "Returns a timestamp formatted in cookie date format from the number
   of **seconds** since the epoch."
  [timestamp]<commit_msg>reduce token lifetime to 1 day (#1214)<commit_after>(ns com.sixsq.slipstream.auth.utils.timestamp
  "Utilities for creating expiration times for token claims and for formatting
   them correctly for the cookie 'expires' field."
  (:require
    [clj-time.core :as t]
    [clj-time.coerce :as c]
    [clj-time.format :as f]))

(def default-lifetime-minutes (* 24 60))                  ;; 1 day

(def cookie-date-formatter (f/formatter "EEE, dd MMM yyyy HH:mm:ss z"))

(defn format-timestamp
  "Returns a timestamp formatted in cookie date format from the number
   of **seconds** since the epoch."
  [timestamp]
{'fraction_non_alphanumeric': 0.11004016064257029, 'fraction_numerical': 0.01285140562248996, 'mean_word_length': 3.4820143884892087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '10751', 'n_tokens_mistral': 419, 'n_tokens_neox': 381, 'n_words': 142}