practicalli / practicalli/clojure-web-services

Compojure rest app and cookies

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API compojure ring
Dominant language
Markdown
Stars
16
Forks
14
PR merge metrics
No merged PRs in 30d

Description

https://github.com/bakku/clj-rest-web-app

A session stores the currently logged in user ID, configured the ring-session middleware to use a cookie store. After restarting the server the session is refreshed as if it is not using any cookie store.

By default Ring uses an in-memory session store. you can change it to store data in a cookie or something persistent like Redis
https://github.com/ring-clojure/ring/wiki/Sessions#session-stores (edited)
Its configured it to store the data in a cookie
using the site-defaults from ring which already wrapped my routes using the session middleware but the site-defaults are using the in-memory session. I had to update the session configuration of the site-defaults according to my needs to get it to work

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the session middleware configuration in src/clj_rest_web_app/core.clj and the session update in src/clj_rest_web_app/controllers/sessions.clj. Check docker-compose.yml for the cookie secret and compare the site-defaults session configuration with the Ring session-store guidance. Done means the logged-in user session remains available after restarting the application.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
authentication, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.