From 2a23e75374bd72adabc9058abf5545e0d494d19d Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Thu, 15 Feb 2024 15:08:54 +0000 Subject: [PATCH] Remove session library --- go.mod | 1 - go.sum | 1 - server/server.go | 3 --- 3 files changed, 5 deletions(-) diff --git a/go.mod b/go.mod index b18fa4f..a351794 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 github.com/emersion/go-smtp v0.20.2 github.com/go-oauth2/oauth2/v4 v4.5.2 - github.com/go-session/session v3.1.2+incompatible github.com/golang-jwt/jwt/v4 v4.5.0 github.com/google/subcommands v1.2.0 github.com/google/uuid v1.6.0 diff --git a/go.sum b/go.sum index e6b7f33..ffb00f5 100644 --- a/go.sum +++ b/go.sum @@ -40,7 +40,6 @@ github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/go-oauth2/oauth2/v4 v4.5.2 h1:CuZhD3lhGuI6aNLyUbRHXsgG2RwGRBOuCBfd4WQKqBQ= github.com/go-oauth2/oauth2/v4 v4.5.2/go.mod h1:wk/2uLImWIa9VVQDgxz99H2GDbhmfi/9/Xr+GvkSUSQ= -github.com/go-session/session v3.1.2+incompatible h1:yStchEObKg4nk2F7JGE7KoFIrA/1Y078peagMWcrncg= github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= diff --git a/server/server.go b/server/server.go index dde3a8d..4491b82 100644 --- a/server/server.go +++ b/server/server.go @@ -17,7 +17,6 @@ import ( "github.com/go-oauth2/oauth2/v4/manage" "github.com/go-oauth2/oauth2/v4/server" "github.com/go-oauth2/oauth2/v4/store" - "github.com/go-session/session" "github.com/julienschmidt/httprouter" "log" "net/http" @@ -52,8 +51,6 @@ type mailLinkKey struct { } func NewHttpServer(conf Conf, db *database.DB, signingKey mjwt.Signer) *http.Server { - session.InitManager(session.SetCookieName("tulip_session")) - r := httprouter.New() // remove last slash from baseUrl