follow-0.1.0.0: Haskell library to follow content published on any subject.

Safe HaskellNone
LanguageHaskell2010

Follow.Digesters.Pocket.Auth

Description

This module contains functions to deal with the authentication process of Pocket. Read https://getpocket.com/developer/docs/authentication to have all the details of this process.

A user friendly method to interact with the authentication process is through the command:

stack exec follow_pocket_auth
Synopsis

Documentation

requestTokenStep :: (MonadThrow m, MonadHttp m) => m (Text, Text) Source #

First auth step. Asks Pocket for a request token. It returns the token itself and the URL that the user must visit in order to grant access before proceeding to the second step.

accessTokenStep :: (MonadHttp m, MonadThrow m) => Text -> m Text Source #

Second auth step. Once a user has granted permission to Follow, it exchanges a request token for an access token. The access token is what it needs to be used in any other Pocket API call.

jsonPostResponseBody :: (ToJSON b, MonadHttp m, MonadThrow m) => Url scheme -> b -> Option scheme -> m (HashMap Text Value) Source #

Gets the JSON response body of a POST request.

jsonHeaders :: Option scheme Source #

Pocket expected headers for a JSON interaction.

consumerKey :: Text Source #

Consumer key for the Follow application in Pocket.