Documentation
¶
Index ¶
- type MyCookieStore
- func (m *MyCookieStore) Load(w http.ResponseWriter, r *http.Request) (string, error)
- func (m *MyCookieStore) ReadState(r *http.Request) (authboss.ClientState, error)
- func (m *MyCookieStore) Save(w http.ResponseWriter, r *http.Request, token string) error
- func (m *MyCookieStore) WriteState(w http.ResponseWriter, state authboss.ClientState, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyCookieStore ¶
type MyCookieStore struct {
// contains filtered or unexported fields
}
MyCookieStore is a custom cookie state store that implements the authboss.ClientState interface.
func NewMyCookieStore ¶
func NewMyCookieStore(cookieName string) *MyCookieStore
NewMyCookieStore creates a new instance of MyCookieStore.
func (*MyCookieStore) Load ¶
func (m *MyCookieStore) Load(w http.ResponseWriter, r *http.Request) (string, error)
Load loads the client state data for a given client token from the cookie.
func (*MyCookieStore) ReadState ¶
func (m *MyCookieStore) ReadState(r *http.Request) (authboss.ClientState, error)
ReadState implements authboss.ClientStateReadWriter.
func (*MyCookieStore) Save ¶
func (m *MyCookieStore) Save(w http.ResponseWriter, r *http.Request, token string) error
Save saves the client state data for a given client token to the cookie.
func (*MyCookieStore) WriteState ¶
func (m *MyCookieStore) WriteState(w http.ResponseWriter, state authboss.ClientState, events []authboss.ClientStateEvent) error
WriteState implements authboss.ClientStateReadWriter.
Click to show internal directories.
Click to hide internal directories.