Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSessionNotFound = fmt.Errorf("session not found")
Functions ¶
Types ¶
type InMemoryStore ¶ added in v0.7.0
type InMemoryStore struct {
// contains filtered or unexported fields
}
func NewInMemoryStore ¶ added in v0.7.0
func NewInMemoryStore() *InMemoryStore
func (*InMemoryStore) Delete ¶ added in v0.7.0
func (s *InMemoryStore) Delete(sessionID string) error
func (*InMemoryStore) Load ¶ added in v0.7.0
func (s *InMemoryStore) Load(sessionID string) (*State, error)
func (*InMemoryStore) Save ¶ added in v0.7.0
func (s *InMemoryStore) Save(state *State) error
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
Click to show internal directories.
Click to hide internal directories.