Skip to content

Commit

Permalink
update to use new urls and add message
Browse files Browse the repository at this point in the history
  • Loading branch information
foamdino committed Sep 28, 2012
1 parent c371163 commit 8f5ee01
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/browserid.go
Expand Up @@ -8,12 +8,13 @@ import (
"log"
"net/http"
"net/url"
"fmt"
)

const loginform = `
<html>
<head>
<script src="https://browserid.org/include.js"></script>
<script src="https://login.persona.org/include.js"></script>
<script>
function login() {
navigator.id.get(function(assertion) {
Expand Down Expand Up @@ -80,7 +81,7 @@ func browserIDResponseFromJson(r io.Reader) (resp BrowserIDResponse) {
func verifyAssertion(assertion string) BrowserIDResponse {
audience := "http://localhost:8080"
resp, _ := http.PostForm(
"https://browserid.org/verify",
"https://verifier.login.persona.org/verify",
url.Values{
"assertion": {assertion},
"audience": {audience},
Expand All @@ -106,6 +107,7 @@ func rootPageHandler(w http.ResponseWriter, r *http.Request) {
}

func main() {
fmt.Println("Now open http://localhost:8080")
http.HandleFunc("/", rootPageHandler)
http.ListenAndServe(":8080", nil)
}

0 comments on commit 8f5ee01

Please sign in to comment.