Skip to content

Commit

Permalink
Update example code to use correct package name.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsymonds committed Mar 10, 2014
1 parent 232376c commit aa421c1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
)

var (
backend goauth.GobFileAuthBackend
aaa goauth.Authorizer
backend httpauth.GobFileAuthBackend
aaa httpauth.Authorizer
)


func main() {
backend = goauth.NewGobFileAuthBackend("auth.gob")
aaa = goauth.NewAuthorizer(backend, []byte("cookie-encryption-key"))
backend = httpauth.NewGobFileAuthBackend("auth.gob")
aaa = httpauth.NewAuthorizer(backend, []byte("cookie-encryption-key"))

// set up routers and route handlers
r := mux.NewRouter()
Expand All @@ -36,7 +36,7 @@ func getLogin(rw http.ResponseWriter, req *http.Request) {
<html>
<head><title>Login</title></head>
<body>
<h1>Goauth example</h1>
<h1>Httpauth example</h1>
<h2>Entry Page</h2>
<p><b>Messages: %v</b></p>
<h3>Login</h3>
Expand Down Expand Up @@ -94,7 +94,7 @@ func handlePage(rw http.ResponseWriter, req *http.Request) {
<html>
<head><title>Secret page</title></head>
<body>
<h1>Goauth example<h1>
<h1>Httpauth example<h1>
<h2>Hello %v</h2>
<p>Your email is %v. <a href="/logout">Logout</a></p>
<form action="/change" method="post" id="change">
Expand Down

0 comments on commit aa421c1

Please sign in to comment.