2018-04-28 05:38:46 +02:00
|
|
|
// Copyright 2018 Frédéric Guillot. All rights reserved.
|
2017-11-28 06:30:04 +01:00
|
|
|
// Use of this source code is governed by the Apache 2.0
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2018-08-25 06:51:50 +02:00
|
|
|
package middleware // import "miniflux.app/middleware"
|
2017-11-28 06:30:04 +01:00
|
|
|
|
2017-12-17 03:07:53 +01:00
|
|
|
// ContextKey represents a context key.
|
2018-08-25 18:50:43 +02: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-28 06:30:04 +01:00
|
|
|
)
|