https://github.com/ring-clojure/ring-session-timeout
Ring middleware for session timeouts
https://github.com/ring-clojure/ring-session-timeout
Last synced: 10 months ago
JSON representation
Ring middleware for session timeouts
- Host: GitHub
- URL: https://github.com/ring-clojure/ring-session-timeout
- Owner: ring-clojure
- Created: 2014-05-24T20:02:05.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-04-09T01:47:40.000Z (almost 3 years ago)
- Last Synced: 2025-05-02T00:02:15.836Z (10 months ago)
- Language: Clojure
- Size: 69.3 KB
- Stars: 35
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ring-Session-Timeout
[](https://github.com/ring-clojure/ring-session-timeout/actions/workflows/test.yml)
Ring middleware that provides idle and absolute timeouts for sessions.
## Installation
Add the following dependency to your `project.clj`:
[ring/ring-session-timeout "0.3.0"]
## Usage
Place the timeout middleware inside that of your session middleware,
and supply a `:timeout-response` or `:timeout-handler` to be used when
the session times out.
```clojure
(-> handler
(wrap-idle-session-timeout {:timeout-response redirect-to-login})
(wrap-session))
```
For more information, see the API docs linked below.
## Documentation
* [API Docs](http://ring-clojure.github.io/ring-session-timeout/ring.middleware.session-timeout.html)
## License
Copyright © 2023 James Reeves
Distributed under the MIT License, the same as Ring.