Documentation ¶
Overview ¶
session package provides typesafe access to session data
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KratosSession ¶
type KratosSession struct {
// contains filtered or unexported fields
}
KratosSession is used to access information from a Kratos 'Session' JSON payload
func NewKratosSession ¶
func NewKratosSession(s string) KratosSession
func (KratosSession) AddressVerified ¶
func (ks KratosSession) AddressVerified() bool
func (KratosSession) Email ¶
func (ks KratosSession) Email() string
func (KratosSession) FirstName ¶
func (ks KratosSession) FirstName() string
func (KratosSession) Id ¶
func (ks KratosSession) Id() string
func (KratosSession) Json ¶
func (ks KratosSession) Json() string
func (KratosSession) JsonPretty ¶
func (ks KratosSession) JsonPretty() string
func (KratosSession) LastName ¶
func (ks KratosSession) LastName() string
type SessionStore ¶
type SessionStore struct { // Session store Store *sessions.CookieStore }
SessionStore holds a connection to the application Session store
func (SessionStore) GetKratosSession ¶
func (s SessionStore) GetKratosSession(r *http.Request) *KratosSession
GetKratosSession returns the KratosSession or nil
func (SessionStore) SaveKratosSession ¶
func (s SessionStore) SaveKratosSession(w http.ResponseWriter, r *http.Request, ks string) error
SaveKratosSession stores a string as the KratosSession value
Click to show internal directories.
Click to hide internal directories.