mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-05-29 23:17:38 +02:00
Remove unused request scope fields
This commit is contained in:
parent
b794248176
commit
a310166981
@ -28,17 +28,6 @@ type RequestScope struct {
|
||||
// Session details the authenticated users information (if it exists).
|
||||
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 string
|
||||
}
|
||||
|
@ -34,15 +34,15 @@ var _ = Describe("Scope Suite", func() {
|
||||
|
||||
Context("if the scope is then modified", func() {
|
||||
BeforeEach(func() {
|
||||
Expect(scope.SaveSession).To(BeFalse())
|
||||
scope.SaveSession = true
|
||||
Expect(scope.RequestID).To(BeEmpty())
|
||||
scope.RequestID = "abc123"
|
||||
})
|
||||
|
||||
It("returns the updated session", func() {
|
||||
s := middleware.GetRequestScope(request)
|
||||
Expect(s).ToNot(BeNil())
|
||||
Expect(s).To(Equal(scope))
|
||||
Expect(s.SaveSession).To(BeTrue())
|
||||
Expect(s.RequestID).To(Equal("abc123"))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user