| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.OAuth2.HttpClient
Contents
Description
Bindings for The OAuth 2.0 Authorization Framework: Bearer Token Usage RFC6750 https://www.rfc-editor.org/rfc/rfc6750
Synopsis
- authGetJSON :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) => Manager -> AccessToken -> URI -> ExceptT ByteString m a
- authGetBS :: forall (m :: Type -> Type). MonadIO m => Manager -> AccessToken -> URI -> ExceptT ByteString m ByteString
- authGetJSONWithAuthMethod :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) => APIAuthenticationMethod -> Manager -> AccessToken -> URI -> ExceptT ByteString m a
- authGetBSWithAuthMethod :: forall (m :: Type -> Type). MonadIO m => APIAuthenticationMethod -> Manager -> AccessToken -> URI -> ExceptT ByteString m ByteString
- authPostJSON :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) => Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString m a
- authPostBS :: forall (m :: Type -> Type). MonadIO m => Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString m ByteString
- authPostJSONWithAuthMethod :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) => APIAuthenticationMethod -> Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString m a
- authPostBSWithAuthMethod :: forall (m :: Type -> Type). MonadIO m => APIAuthenticationMethod -> Manager -> AccessToken -> URI -> PostBody -> ExceptT ByteString m ByteString
- data APIAuthenticationMethod
AUTH requests
Arguments
| :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) | |
| => Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> ExceptT ByteString m a | Response as JSON |
Conduct an authorized GET request and return response as JSON. Inject Access Token to Authorization Header.
Arguments
| :: forall (m :: Type -> Type). MonadIO m | |
| => Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> ExceptT ByteString m ByteString | Response as ByteString |
Conduct an authorized GET request. Inject Access Token to Authorization Header.
authGetJSONWithAuthMethod Source #
Arguments
| :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) | |
| => APIAuthenticationMethod | |
| -> Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> ExceptT ByteString m a | Response as JSON |
Conduct an authorized GET request and return response as JSON. Allow to specify how to append AccessToken.
Since: 2.6.0
authGetBSWithAuthMethod Source #
Arguments
| :: forall (m :: Type -> Type). MonadIO m | |
| => APIAuthenticationMethod | Specify the way that how to append the |
| -> Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> ExceptT ByteString m ByteString | Response as ByteString |
Conduct an authorized GET request and return response as ByteString. Allow to specify how to append AccessToken.
Since: 2.6.0
Arguments
| :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) | |
| => Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> PostBody | |
| -> ExceptT ByteString m a | Response as JSON |
Conduct POST request and return response as JSON. Inject Access Token to Authorization Header.
Arguments
| :: forall (m :: Type -> Type). MonadIO m | |
| => Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> PostBody | |
| -> ExceptT ByteString m ByteString | Response as ByteString |
Conduct POST request. Inject Access Token to http header (Authorization)
authPostJSONWithAuthMethod Source #
Arguments
| :: forall (m :: Type -> Type) a. (MonadIO m, FromJSON a) | |
| => APIAuthenticationMethod | |
| -> Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> PostBody | |
| -> ExceptT ByteString m a | Response as ByteString |
Conduct POST request and return response as JSON. Allow to specify how to append AccessToken.
Since: 2.6.0
authPostBSWithAuthMethod Source #
Arguments
| :: forall (m :: Type -> Type). MonadIO m | |
| => APIAuthenticationMethod | |
| -> Manager | HTTP connection manager. |
| -> AccessToken | |
| -> URI | |
| -> PostBody | |
| -> ExceptT ByteString m ByteString | Response as ByteString |
Conduct POST request and return response as ByteString. Allow to specify how to append AccessToken.
Since: 2.6.0
Types
data APIAuthenticationMethod Source #
Constructors
| AuthInRequestHeader | Provides in Authorization header |
| AuthInRequestBody | Provides in request body |
| AuthInRequestQuery | Provides in request query parameter |
Instances
| Eq APIAuthenticationMethod Source # | |
Defined in Network.OAuth2.HttpClient Methods (==) :: APIAuthenticationMethod -> APIAuthenticationMethod -> Bool # (/=) :: APIAuthenticationMethod -> APIAuthenticationMethod -> Bool # | |
| Ord APIAuthenticationMethod Source # | |
Defined in Network.OAuth2.HttpClient Methods compare :: APIAuthenticationMethod -> APIAuthenticationMethod -> Ordering # (<) :: APIAuthenticationMethod -> APIAuthenticationMethod -> Bool # (<=) :: APIAuthenticationMethod -> APIAuthenticationMethod -> Bool # (>) :: APIAuthenticationMethod -> APIAuthenticationMethod -> Bool # (>=) :: APIAuthenticationMethod -> APIAuthenticationMethod -> Bool # max :: APIAuthenticationMethod -> APIAuthenticationMethod -> APIAuthenticationMethod # min :: APIAuthenticationMethod -> APIAuthenticationMethod -> APIAuthenticationMethod # | |