Documentation
¶
Index ¶
Constants ¶
View Source
const PKCEVerifierTTL = 10 * time.Minute
Variables ¶
View Source
var ErrPKCEVerifierNotFound = fmt.Errorf("pkce verifier not found")
View Source
var ErrSessionNotFound = fmt.Errorf("session not found")
Functions ¶
Types ¶
type State ¶
type State struct {
Token TokenInfo `msgpack:"tok,omitempty"`
SessionID string `msgpack:"sid,omitempty"`
ClusterID string `msgpack:"cid,omitempty"`
RedirectURL string `msgpack:"red,omitempty"`
CreatedAt time.Time `msgpack:"cat,omitempty"`
ExpiresAt time.Time `msgpack:"eat,omitempty"`
}
State is the data stored on the clientside as a browser cookie. To be independent of the OIDC token sizes, it only stores the absolute minimum information required for this particular backend implementation. Especially when lots of groups and claims are involved, the tokens can grow to a size larger than allowed by browsers for cookies, and even compression would only be a small adhesive strip, not a solution.
func (*State) SetExpiration ¶ added in v0.7.0
SetExpiration sets the session expiration time
type Store ¶ added in v0.7.0
type Store interface {
Save(ctx context.Context, state *State) error
Load(ctx context.Context, sessionID string) (*State, error)
Delete(ctx context.Context, sessionID string) error
SavePKCEVerifier(ctx context.Context, sessionID, verifier string) error
LoadAndDeletePKCEVerifier(ctx context.Context, sessionID string) (string, error)
}
Click to show internal directories.
Click to hide internal directories.