aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorNiall Sheridan <niall@intercom.io>2016-04-21 13:13:16 +0100
committerNiall Sheridan <niall@intercom.io>2016-04-21 13:13:16 +0100
commitdc4ec50664392f30354b9f300b55a8d02ec94737 (patch)
treea0454b716c2aafd633db26b3b4ef1d47531ea4a8 /server
parentbadf70fa44b2563348126da7aba1927a683bb476 (diff)
Missed some bits
Diffstat (limited to 'server')
-rw-r--r--server/main.go4
-rw-r--r--server/signer/signer_test.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/main.go b/server/main.go
index 590f67d..c5865de 100644
--- a/server/main.go
+++ b/server/main.go
@@ -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,
diff --git a/server/signer/signer_test.go b/server/signer/signer_test.go
index 6feeaa5..08f9025 100644
--- a/server/signer/signer_test.go
+++ b/server/signer/signer_test.go
@@ -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)
}