-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | hoauth2 -- -- Haskell OAuth2 authentication. -- -- Tested following services -- -- @package hoauth2 @version 0.2.0 module Network.OAuth2.OAuth2 -- | Query Parameter Representation data OAuth2 OAuth2 :: ByteString -> ByteString -> ByteString -> ByteString -> Maybe ByteString -> Maybe ByteString -> OAuth2 oauthClientId :: OAuth2 -> ByteString oauthClientSecret :: OAuth2 -> ByteString oauthOAuthorizeEndpoint :: OAuth2 -> ByteString oauthAccessTokenEndpoint :: OAuth2 -> ByteString oauthCallback :: OAuth2 -> Maybe ByteString oauthAccessToken :: OAuth2 -> Maybe ByteString -- | The gained Access Token. Use Data.Aeson.decode to decode -- string to AccessToken. data AccessToken AccessToken :: ByteString -> AccessToken accessToken :: AccessToken -> ByteString -- | Simple Exception representation. data OAuthException OAuthException :: String -> OAuthException -- | Prepare the authorization URL. Redirect to this URL asking for user -- interactive authentication. authorizationUrl :: OAuth2 -> URI -- | Prepare access token URL and the request body query. accessTokenUrl :: OAuth2 -> ByteString -> (URI, PostBody) instance Typeable OAuthException instance Show OAuth2 instance Eq OAuth2 instance Show OAuthException instance Eq OAuthException instance Show AccessToken instance FromJSON AccessToken instance Exception OAuthException module Network.OAuth2.HTTP.HttpClient -- | Request (POST method) access token URL in order to get -- AccessToken. FIXME: what if requestAccessToken' -- return error? requestAccessToken :: OAuth2 -> ByteString -> IO (Maybe AccessToken) -- | Performance a http Request doRequest :: ResourceIO m => Request m -> m (Response ByteString) -- | insert access token into the request signRequest :: OAuth2 -> Request m -> Request m