aboutsummaryrefslogtreecommitdiffhomepage
path: root/http
diff options
context:
space:
mode:
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)