-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The browserid.org domain is now redirecting to login.persona.org
- Loading branch information
Francois Marier
committed
Nov 9, 2012
1 parent
edff285
commit 213ccc8
Showing
4 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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...") | ||
|