Skip to content

Commit

Permalink
The browserid.org domain is now redirecting to login.persona.org
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Marier committed Nov 9, 2012
1 parent edff285 commit 213ccc8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ understand Persona (BrowserID) and Clojure / Clojurescript (with Noir).

Mozilla Persona (BrowserID) aims to be a better, more usable and more privacy-conscious
implementation of OpenID.
* [BrowserID Project Documentation at MDN](https://developer.mozilla.org/en/BrowserID#The_BrowserID_Project)
* [BrowserID Quick Setup Guide](https://developer.mozilla.org/en/BrowserID/Quick_Setup)
* [Persona Project Documentation at MDN](https://developer.mozilla.org/en-US/docs/Persona)
* [Persona Quick Setup Guide](https://developer.mozilla.org/en-US/docs/Persona/Quick_Setup)

Clojurescript, event handling and relevant client server integration with Clojure.
* Setting up with Clojurescript with the [Clojurescript quick start](https://github.com/clojure/clojurescript/wiki/Quick-Start)
Expand All @@ -29,7 +29,7 @@ And visit:

http://localhost:11300/login

Clicking on the sign-in image should do the dance with browserid.org.
Clicking on the sign-in image should do the dance with login.persona.org.
Once you sign in, refreshing the page should detect an authenticated
sign-in. It could use polish, which I might do in the next few days.

Expand Down
4 changes: 2 additions & 2 deletions src-cljs/nongrata/main.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

(defn gotAssertion
[assertion]
(log (str "recieved encrypted response from \nclient after asking browserid.org\n(do not show this in a production env)\n|" assertion "|"))
(log (str "recieved encrypted response from \nclient after asking login.persona.org\n(do not show this in a production env)\n|" assertion "|"))
(if assertion
(fm/remote (apilogin assertion) [response]
(do
Expand All @@ -24,7 +24,7 @@
(log "authentication success!")
(.reload (.-location js/window)))
(js/alert (str "failed authentication:\n" (:reason response))))))
(js/alert "browserid.org gave us a nil response back...")))
(js/alert "login.persona.org gave us a nil response back...")))

(defn logout
[]
Expand Down
2 changes: 1 addition & 1 deletion src/nongrata/views/common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[:head
[:title "nongrata"]
(include-js "http://code.jquery.com/jquery-1.7.1.min.js")
(include-js "https://browserid.org/include.js")
(include-js "https://login.persona.org/include.js")
(include-css "/css/reset.css")
(include-css "/css/persona-buttons.css")
(include-css "/css/persona-additions.css")]
Expand Down
8 changes: 4 additions & 4 deletions src/nongrata/views/login.clj
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@
; "connection" "close",
; "content-length" "121"},
; :body
; "{\"status\":\"okay\",\"email\":\"[email protected]\",\"audience\":\"localhost\",\"expires\":1336440085619,\"issuer\":\"browserid.org\"}"}
; "{\"status\":\"okay\",\"email\":\"[email protected]\",\"audience\":\"localhost\",\"expires\":1336440085619,\"issuer\":\"login.persona.org\"}"}

(defremote apilogin [assertion]
(info (str "recieved assertion: " assertion "\n\nNow submitting back to browserid.org"))
(info (str "recieved assertion: " assertion "\n\nNow submitting back to login.persona.org"))
(info (str "posting audience '" (get-hostname) "'.\nBe aware that if you're surfing the test site at a different URL, this will fail."))
(if-let [bid-response
(client/post "https://browserid.org/verify"
(client/post "https://verifier.login.persona.org/verify"
{:form-params {:assertion assertion :audience "localhost"}})]
(do
(info (str "got response from browser id: " bid-response))
(let [body-map (read-json (:body bid-response))]
(if (= 200 (:status bid-response))
(do
(info (str "HTTP 200 OK from browserid.org: " body-map))
(info (str "HTTP 200 OK from login.persona.org: " body-map))
(if (= "okay" (:status body-map))
(do
(info "Status: okay, creating authenticated user session...")
Expand Down

0 comments on commit 213ccc8

Please sign in to comment.