Hi all,

Dave Della Costa <ddellaco...@gmail.com> writes:

> Here are some more in-depth examples:
>
> https://github.com/ddellacosta/friend-oauth2-examples

Thanks for this examples, very useful!

I'm trying to finish integrating friend within a Luminus-based
webapp project, but I'm stuck, I'd glad to get some help.

Using handler/site for the auth routes (as demonstrated in the github
repo above) works fine.  I can point to http://localhost:3000/repos,
it asks for my github authorization and returns the list of my repos.

Now if I use lib-noir middleware like this:

(defn my-friend [handler]
  (friend/authenticate
   handler
   {:allow-anon? true
    :workflows [(oauth2/workflow
                 {:client-config client-config
                  :uri-config uri-config
                  :access-token-parsefn access-token-parsefn
                  :config-auth config-auth})]}))

(def app (middleware/app-handler
           [auth-routes home-routes app-routes]
           :middleware [my-friend]   ;; <<<<<<<<<<< Added
           :access-rules []))

(def war-handler (middleware/war-handler app))

... then there is an infinite redirect to github (error 403.)

Where should I wrap the friend/authenticate middleware when
using lib-noir's war-handler?

Thanks in advance for any pointer!

-- 
 Bastien

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to