2018-04-27 20:38:46 -07:00
|
|
|
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
2017-11-27 21:30:04 -08:00
|
|
|
// Use of this source code is governed by the Apache 2.0
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2018-08-24 21:51:50 -07:00
|
|
|
package middleware // import "miniflux.app/middleware"
|
2017-11-27 21:30:04 -08:00
|
|
|
|
2017-12-16 18:07:53 -08:00
|
|
|
// ContextKey represents a context key.
|
2018-08-25 09:50:43 -07:00
|
|
|
type ContextKey int
|
|
|
|
|
|
|
|
// List of context keys.
|
|
|
|
const (
|
|
|
|
UserIDContextKey ContextKey = iota
|
|
|
|
UserTimezoneContextKey
|
|
|
|
IsAdminUserContextKey
|
|
|
|
IsAuthenticatedContextKey
|
|
|
|
UserSessionTokenContextKey
|
|
|
|
UserLanguageContextKey
|
|
|
|
UserThemeContextKey
|
|
|
|
SessionIDContextKey
|
|
|
|
CSRFContextKey
|
|
|
|
OAuth2StateContextKey
|
|
|
|
FlashMessageContextKey
|
|
|
|
FlashErrorMessageContextKey
|
|
|
|
PocketRequestTokenContextKey
|
2017-11-27 21:30:04 -08:00
|
|
|
)
|