func GetRequestScope(req *http.Request) *RequestScope {
	scope := req.Context().Value(RequestScopeKey)
	if scope == nil {
		return nil
	}
	return scope.(*RequestScope)
}
GetRequestScope returns the current request scope from the given request
package middleware
import (
	"context"
	"net/http"
	"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/sessions"
)
type scopeKey string
const RequestScopeKey scopeKey = "request-scope"
type RequestScope struct {
	ReverseProxy bool
	RequestID string
	Session *sessions.SessionState
	SaveSession bool
	ClearSession bool
	SessionRevalidated bool
	Upstream string
}