2020-07-04 18:41:58 +01:00
|
|
|
package middleware
|
|
|
|
|
|
|
|
import (
|
2020-09-30 01:44:42 +09:00
|
|
|
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/sessions"
|
2020-07-04 18:41:58 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// RequestScope contains information regarding the request that is being made.
|
|
|
|
// The RequestScope is used to pass information between different middlewares
|
|
|
|
// within the chain.
|
|
|
|
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
|
|
|
|
}
|