You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sandbar Library
Hi,
I found that using ring's (wrap-reload '[namespace-of-routes-
definition]) in your application routes breaks the form-
authentication. The login form redirects back to the login form
regardless of the outcome. It doesn't matter what order in the ->
threading for your routes you put (wrap-reload) in either. I noticed
that form-authentication-adapter is evaluated many times instead of
once when (wrap-reload) is used. My Clojure skills aren't yet up to
working-out why this is. It only breaks if the namespaced in which the
routes are defined (i.e. similar to core in the example code) is wrap-
reloaded.
Brenton
unread,
Apr 7, 2011, 11:43:17 AM4/7/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sandbar Library
When you reload the namespace that contains the call to wrap-session
or wrap-stateful-session you will create a new session.
- the memory-store function will be called again and a new atom
created.
There are two ways around this.
1) Don't reload this namespace. Put this part of your app in a
namespace that is not reloaded.
2) Create your own session atom with defonce and pass is as an option
to wrap-session or wrap-stateful session.
Option 2 has the advantage that you can inspect the contents of the
session during development. The key is to use defonce so that the
session will be re-deffed when the namespace is reloaded.