{"id":23626327,"url":"https://github.com/yetanalytics/ring-jwt-session","last_synced_at":"2025-10-03T19:49:48.953Z","repository":{"id":57713571,"uuid":"60818098","full_name":"yetanalytics/ring-jwt-session","owner":"yetanalytics","description":"A cookie session store for ring using JSON Web Tokens","archived":false,"fork":false,"pushed_at":"2016-06-13T21:07:18.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-27T23:13:27.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yetanalytics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-10T01:44:48.000Z","updated_at":"2020-04-01T23:02:51.000Z","dependencies_parsed_at":"2022-09-26T17:41:06.907Z","dependency_job_id":null,"html_url":"https://github.com/yetanalytics/ring-jwt-session","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fring-jwt-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fring-jwt-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fring-jwt-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fring-jwt-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yetanalytics","download_url":"https://codeload.github.com/yetanalytics/ring-jwt-session/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239533831,"owners_count":19654770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-27T22:52:57.311Z","updated_at":"2025-10-03T19:49:43.900Z","avatar_url":"https://github.com/yetanalytics.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ring-jwt-session\n\n[![Build Status](https://travis-ci.org/yetanalytics/ring-jwt-session.svg?branch=master)](https://travis-ci.org/yetanalytics/ring-jwt-session)\n\nProvides a stateless ring session cookie store using JSON Web Tokens. As with encrypted cookies, the 'key' is the session itself. The client can read the session (unless you make it `:http-only`), but if it is modified it will fail verification on the server.\n\nPlease note that this lib is highly experimental and is NOT for production use just yet.\n\n\n## Installation\nLeiningen:\n\n``` clojure\n[com.yetanalytics/ring-jwt-session \"0.1.1\"]\n```\n\n## Usage\n\n``` clojure\n(ns your.handler\n  (:require\n    ...\n    [ring.middleware.defaults :refer [wrap-defaults\n                                      site-defaults]]\n    [ring.middleware.session.jwt-cookie\n     :refer [jwt-cookie-store\n             wrap-token-errors\n             wrap-jwt-origin]]))\n\n(def app\n  (-\u003e app-routes\n      wrap-jwt-origin ;; optional origin verification for CORS\n      (wrap-defaults\n       (-\u003e site-defaults\n           (assoc-in [:session :store]\n                     ;; chose a better key, preferably at least 128-bit\n                     (jwt-cookie-store \"seekrit\"))\n           (assoc-in\n            [:session :cookie-attrs :http-only] false))) ;; let the client see\n      ;; catch jwt validation errors\n      wrap-token-errors))\n```\n\n### Cljs\n\nA helper is provided to get/decode the session in the browser.\n\n``` clojure\n(require 'ring-jwt-session.core :refer [get-session])\n\n(get-session) ;; =\u003e {...}\n;; or with a custom session key:\n(get-session \"my-session-key\")\n\n```\n\n## License\n\nCopyright © 2016 Yet Analytics\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyetanalytics%2Fring-jwt-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyetanalytics%2Fring-jwt-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyetanalytics%2Fring-jwt-session/lists"}