diff options
author | r <r@freesoftwareextremist.com> | 2023-10-07 10:20:11 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2023-10-07 10:20:11 +0000 |
commit | 927072e26a470ed3084e36ae2413f4dfd088905f (patch) | |
tree | 830296c74ceac055405b596a40f59265b9d4e386 | |
parent | c7f40c1e1568bf3f0fcb15c0fc0d01f0f253675d (diff) | |
download | bloat-927072e26a470ed3084e36ae2413f4dfd088905f.tar.gz bloat-927072e26a470ed3084e36ae2413f4dfd088905f.zip |
Remove unused session ID field
-rw-r--r-- | model/session.go | 1 | ||||
-rw-r--r-- | service/service.go | 5 | ||||
-rw-r--r-- | util/rand.go | 4 |
3 files changed, 0 insertions, 10 deletions
diff --git a/model/session.go b/model/session.go index 6ada4aa..f9e4287 100644 --- a/model/session.go +++ b/model/session.go @@ -1,7 +1,6 @@ package model type Session struct { - ID string `json:"id,omitempty"` UserID string `json:"uid,omitempty"` Instance string `json:"ins,omitempty"` ClientID string `json:"cid,omitempty"` diff --git a/service/service.go b/service/service.go index ca80a2b..2f87fa3 100644 --- a/service/service.go +++ b/service/service.go @@ -840,10 +840,6 @@ func (s *service) NewSession(c *client, instance string) (rurl string, sess *mod instanceURL = "https://" + instance } - sid, err := util.NewSessionID() - if err != nil { - return - } csrf, err := util.NewCSRFToken() if err != nil { return @@ -861,7 +857,6 @@ func (s *service) NewSession(c *client, instance string) (rurl string, sess *mod } rurl = app.AuthURI sess = &model.Session{ - ID: sid, Instance: instance, ClientID: app.ClientID, ClientSecret: app.ClientSecret, diff --git a/util/rand.go b/util/rand.go index 90e66a5..f1692b9 100644 --- a/util/rand.go +++ b/util/rand.go @@ -16,10 +16,6 @@ func NewRandID(n int) (string, error) { return enc.EncodeToString(data), nil } -func NewSessionID() (string, error) { - return NewRandID(24) -} - func NewCSRFToken() (string, error) { return NewRandID(24) } |