Fork me on GitHub
#announcements
<
2020-06-16
>
kimim11:06:25

Hi all, I managed to eval Clojure in org-mode without project.clj and cider. Maybe someone is looking for this solution, you can check my emacs config: https://github.com/kimim/kimim-emacs/blob/master/README.org#clojure

parrot 21
bringe19:06:26

Hello - while working on a project recently for which I developed user authentication, I decided to separate the auth part out into its own repo for my own reference later, and I figure others might find it useful as well, especially if you want to use pedestal. There's some packaging and deployment in there as well. https://github.com/bpringe/auth-template

metal 51
parrot 3
bmo 3
👍 3
eskos06:06:29

Thank you for this! 🙂 These things tend to be really complex once one decide to go feature complete (just see the flow chart for proper REST resource!), so having this available as template is of a great help 👍

eskos06:06:11

And just in case you're not aware what I'm referencing: https://github.com/for-GET/http-decision-diagram

Lucy Wang14:06:08

Just read a bit about the code, seems the session must be tied to a user - which makes me thinking how would you implement features like "require captcha after logging in failed for 3+ times" ?

bringe02:06:17

@U8SFC8HLP Welcome! Yeah I made the flow chart mainly to keep track of what I was doing to begin with. @UP90Q48J3 The sessions can be anonymous - user_id is null in the db row in that case (to be specific). See the anonymous-session interceptor here: https://github.com/bpringe/auth-template/blob/954b8a78f7e6d91b4dd12446ec69aba004c53d1e/src/auth_template/service.clj#L208

bringe02:06:20

There may be a better way to handle anon sessions - but this is a simple starting point / works.

Lucy Wang08:06:48

Thanks, LGTM!

👍 3