Documentation
¶
Index ¶
- type Session
- func (s *Session) DoLogin(ctx context.Context, userID, password string) error
- func (s *Session) Get(w http.ResponseWriter, r *http.Request) (*http.Request, *ttnpb.UserSession, error)
- func (s *Session) GetUser(w http.ResponseWriter, r *http.Request) (*http.Request, *ttnpb.User, error)
- func (s *Session) RemoveAuthCookie(w http.ResponseWriter, r *http.Request)
- func (s *Session) UpdateAuthCookie(w http.ResponseWriter, r *http.Request, ...) error
- type Store
- type TransactionalStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
Store TransactionalStore
}
Session is the session helper.
func (*Session) Get ¶
func (s *Session) Get(w http.ResponseWriter, r *http.Request) (*http.Request, *ttnpb.UserSession, error)
Get retrieves the current session.
func (*Session) GetUser ¶
func (s *Session) GetUser(w http.ResponseWriter, r *http.Request) (*http.Request, *ttnpb.User, error)
GetUser retrieves the user that is associated with the current session.
func (*Session) RemoveAuthCookie ¶
func (s *Session) RemoveAuthCookie(w http.ResponseWriter, r *http.Request)
RemoveAuthCookie deletes the authentication cookie.
func (*Session) UpdateAuthCookie ¶
func (s *Session) UpdateAuthCookie(w http.ResponseWriter, r *http.Request, update func(value *auth.CookieShape) error) error
UpdateAuthCookie updates the current authentication cookie.
Click to show internal directories.
Click to hide internal directories.