Skip to content
Snippets Groups Projects
Commit dc4ec506 authored by Niall Sheridan's avatar Niall Sheridan
Browse files

Missed some bits

parent badf70fa
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ func signHandler(a *appContext, w http.ResponseWriter, r *http.Request) (int, er
// loginHandler starts the authentication process with the provider.
func loginHandler(a *appContext, w http.ResponseWriter, r *http.Request) (int, error) {
a.authsession = a.authprovider.StartSession(newState(32))
a.authsession = a.authprovider.StartSession(newState())
http.Redirect(w, r, a.authsession.AuthURL, http.StatusFound)
return http.StatusFound, nil
}
......@@ -203,7 +203,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
authprovider := google.New(config.Auth)
authprovider := google.New(&config.Auth)
ctx := &appContext{
cookiestore: sessions.NewCookieStore([]byte(config.Server.CookieSecret)),
authprovider: authprovider,
......
......@@ -27,7 +27,7 @@ func TestCert(t *testing.T) {
Principal: "gopher1",
ValidUntil: time.Now().Add(1 * time.Hour),
}
ret, err := signer.Sign(r)
ret, err := signer.SignUserKey(r)
if err != nil {
t.Fatal(err)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment