aboutsummaryrefslogtreecommitdiffhomepage
path: root/http
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-05-20 15:29:14 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-05-20 15:29:14 -0700
commit7f2fd1fdd85a62b187ad901d4917e561e39e37b2 (patch)
tree635fd7622cda67a0b9a422e093edee0b2bbc7399 /http
parent0f3f5e442f81d37a03618d0df5ea8f0524a24029 (diff)
Add Pocket authorization flow in the user interface
Diffstat (limited to 'http')
-rw-r--r--http/context/context.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/http/context/context.go b/http/context/context.go
index cf7cb09..f0fed23 100644
--- a/http/context/context.go
+++ b/http/context/context.go
@@ -78,6 +78,11 @@ func (c *Context) FlashErrorMessage() string {
return c.getContextStringValue(middleware.FlashErrorMessageContextKey)
}
+// PocketRequestToken returns the Pocket Request Token if any.
+func (c *Context) PocketRequestToken() string {
+ return c.getContextStringValue(middleware.PocketRequestTokenContextKey)
+}
+
func (c *Context) getContextStringValue(key *middleware.ContextKey) string {
if v := c.request.Context().Value(key); v != nil {
return v.(string)