Along the lines of automatically starting of the OpenID workflow: is there
a nicer solution than
patching
https://github.com/cemerick/friend/blob/master/src/cemerick/friend/openid.clj#L108
to work with a redirect (hence GET would be needed) and pass in the
identifier either as url-arg or as p
Yes; see the friend/identity and friend/current-authentication functions.
- Chas
On Dec 20, 2012, at 2:15 PM, Murtaza Husain wrote:
>
> I think this seems to be the one - Under :session and the following key
> :cemerick.friend/identity there is - :identity
> https://www.google.com/accounts/o8
I think this seems to be the one - Under :session and the following key
:cemerick.friend/identity there is - :identity
https://www.google.com/accounts/o8/id?id=AItOawlvddewdedwddrft56gt
Thanks,
Murtaza
On Thursday, December 20, 2012 11:56:53 PM UTC+5:30, Murtaza Husain wrote:
>
> Hi,
>
> Onc
Hi,
Once the user is authenticated, how do I get hold of unique user identifier
that was returned by openid provider.
I would like persist this user identifier with the user's authorization
details into the DB.
Murtaza
On Thursday, December 20, 2012 8:06:04 PM UTC+5:30, Murtaza Husain wro
Chas,
It was the header being sent. A form post sends data as url encoded, with
header as url encoded form data, while the javascript library was posting
data as application/json, that is the reason it was failing. Also thanks
for the pointer on realm.
Thanks,
Murtaza
On Thursday, December
Your Clojure code is correct. However, whatever you're using to produce the
POST to /openid (i.e. this 'ng-click="signin('google')"' stuff) isn't behaving
as you're expecting. I didn't dig into what it's actually doing, but a simple
form posting to /openid starts that workflow with Google with
I have changed the parameter name to 'identifier', however I am still
hitting the NPE, any ideas?
I have placed the code on github - https://github.com/murtaza52/cfaiz.git,
if you would like to take a look.
Thanks,
Murtaza
On Thursday, December 20, 2012 12:12:27 AM UTC+5:30, Chas Emerick wr
The parameter name is 'identifier' (not 'openid_identifier') by default (which
you can customize if you want by specifying a :user-identifier-param option in
openid/workflow).
That said, the NPE you just hit has drawn my attention to an (unrelated) bug in
the openid workflow. Thanks! :-)
- Ch
Thanks for catching that Aaron !
The app currently redirects to the login page now. However I get an error
when I try to post to the "/openid" url with
{"openid_identifier":"https://www.google.com/accounts/o8/id"}
as post data.
Here is the updated code -
(ns faiz.handler
(:use compojure.c
On Wed, Dec 19, 2012 at 8:40 AM, Murtaza Husain <
murtaza.hus...@sevenolives.com> wrote:
>
> (defroutes app-routes
> (GET "/" [] (resp/redirect "/landing"))
> (GET "/landing" [] (resp/file-response "landing.html" {:root "public"}))
> (GET "/index" [] (index index-data))
> (route/files "/" {
Chas,
Thanks for the great library and appreciate your taking the time to answer !
1) I have included the key/val - :allow-anon? false - in the
friend/authenticate options map, but I am still able to access all my urls
without any redirection.
2) I have also set the :openid-url "/openid". I
Murtaza,
First, you need to either
(a) :allow-anon? false in the configuration map you provide to
friend/authenticate — it is true by default, or
(b) Use an authorization guard (which can include friend/authenticated, which
reuses the authorization mechanism to ensure that only authenticated us
12 matches
Mail list logo