1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-05-27 23:08:10 +02:00

Remove unused request scope fields

This commit is contained in:
Joel Speed 2022-04-24 18:50:12 +01:00
parent b794248176
commit a310166981
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB
2 changed files with 3 additions and 14 deletions

View File

@ -28,17 +28,6 @@ type RequestScope struct {
// Session details the authenticated users information (if it exists). // Session details the authenticated users information (if it exists).
Session *sessions.SessionState Session *sessions.SessionState
// SaveSession indicates whether the session storage should attempt to save
// the session or not.
SaveSession bool
// ClearSession indicates whether the user should be logged out or not.
ClearSession bool
// SessionRevalidated indicates whether the session has been revalidated since
// it was loaded or not.
SessionRevalidated bool
// Upstream tracks which upstream was used for this request // Upstream tracks which upstream was used for this request
Upstream string Upstream string
} }

View File

@ -34,15 +34,15 @@ var _ = Describe("Scope Suite", func() {
Context("if the scope is then modified", func() { Context("if the scope is then modified", func() {
BeforeEach(func() { BeforeEach(func() {
Expect(scope.SaveSession).To(BeFalse()) Expect(scope.RequestID).To(BeEmpty())
scope.SaveSession = true scope.RequestID = "abc123"
}) })
It("returns the updated session", func() { It("returns the updated session", func() {
s := middleware.GetRequestScope(request) s := middleware.GetRequestScope(request)
Expect(s).ToNot(BeNil()) Expect(s).ToNot(BeNil())
Expect(s).To(Equal(scope)) Expect(s).To(Equal(scope))
Expect(s.SaveSession).To(BeTrue()) Expect(s.RequestID).To(Equal("abc123"))
}) })
}) })
}) })