Documentation ¶
Index ¶
- Constants
- Variables
- func AddVisitedPlugin(ctx context.Context, pluginID string) context.Context
- func GetCurrentUserID(ctx context.Context) *string
- func GetVisitedPlugins(ctx context.Context) []string
- func SetCurrentUserID(ctx context.Context, userID string) context.Context
- type Store
- func (s *Store) Authenticate(w http.ResponseWriter, r *http.Request) (userID string, err error)
- func (s *Store) GetSessionUserID(w http.ResponseWriter, r *http.Request) (string, error)
- func (s *Store) Login(w http.ResponseWriter, r *http.Request) error
- func (s *Store) Logout(w http.ResponseWriter, r *http.Request) error
- func (s *Store) MakePluginCookie(ctx context.Context) *http.Cookie
- func (s *Store) VisitedPluginHandler() func(http.Handler) http.Handler
Constants ¶
View Source
const ( ApiKeyHeader = "ApiKey" ApiKeyParameter = "apikey" )
Variables ¶
View Source
var ErrInvalidCredentials = errors.New("invalid username or password")
Functions ¶
func GetCurrentUserID ¶
GetCurrentUserID gets the current user id from the provided context
func GetVisitedPlugins ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Authenticate ¶
func (*Store) GetSessionUserID ¶
Click to show internal directories.
Click to hide internal directories.