Skip to content

Commit

Permalink
refactor: google example
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Oct 12, 2021
1 parent 0ff7b85 commit cc94831
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/google.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"fmt"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -34,7 +33,7 @@ func main() {
log.Println("user: ", u)

// and tell the user it is all good:
_, _ = fmt.Fprintf(w, "All good, check backend console")
_, _ = w.Write([]byte("All good, check backend console"))
})

// Listen address for server, 443 for https as OpenID connect mandates it!
Expand All @@ -45,11 +44,11 @@ func main() {

// A catch-all dummy handler
handler := func(w http.ResponseWriter, r *http.Request) {
_, _ = fmt.Fprintf(w, r.Method+" "+r.URL.Path+"\n")
_, _ = w.Write([]byte(r.Method + " " + r.URL.Path))
}

fmt.Println("Server running on https://localhost")
fmt.Println(" Visit https://localhost/auth/o8/google")
log.Println("Server running on https://localhost")
log.Println(" Visit https://localhost/auth/o8/google")

// This is just example (don't copy it)
useMux := os.Getenv("GOIC_HTTP_MUX") == "1"
Expand Down

0 comments on commit cc94831

Please sign in to comment.