name:                                       req-oauth2
version:                                    0.1.0.1
synopsis:                                   Provides OAuth2 authentication for use with Req
description:                                This package adds OAuth2 authentication to Req.
homepage:                                   https://github.com/rcook/req-oauth2#readme
license:                                    MIT
license-file:                               LICENSE
author:                                     Richard Cook
maintainer:                                 rcook@rcook.org
copyright:                                  (C) 2018-2021 Richard Cook
category:                                   Command Line
build-type:                                 Simple
cabal-version:                              >= 1.10
extra-source-files:                         README.md

source-repository head
  type:                                     git
  location:                                 https://github.com/rcook/req-oauth2.git

library
  default-language:                         Haskell2010
  hs-source-dirs:                           lib
  ghc-options:                              -W
                                            -Wall
                                            -Werror=incomplete-patterns
                                            -Werror=missing-methods
                                            -fwarn-unused-imports
  build-depends:                            aeson
                                          , base >= 4.7 && < 5
                                          , base64-bytestring
                                          , bytestring
                                          , data-default-class
                                          , http-client
                                          , http-types
                                          , lens
                                          , modern-uri
                                          , req
                                          , text
                                          , transformers
  exposed-modules:                          Network.HTTP.Req.OAuth2
                                          , Network.HTTP.Req.OAuth2.Internal
                                          , Network.HTTP.Req.OAuth2.Internal.AccessToken
                                          , Network.HTTP.Req.OAuth2.Internal.AuthCode
                                          , Network.HTTP.Req.OAuth2.Internal.RefreshToken
                                          , Network.HTTP.Req.OAuth2.Internal.Types
                                          , Network.HTTP.Req.OAuth2.Internal.Util
                                          , Network.HTTP.Req.OAuth2.Internal.Verbs

executable req-oauth2-app
  default-language:                         Haskell2010
  hs-source-dirs:                           app
  main-is:                                  Main.hs
  ghc-options:                              -threaded
                                            -rtsopts
                                            -with-rtsopts=-N
                                            -W
                                            -Wall
                                            -Werror=incomplete-patterns
                                            -Werror=missing-methods
                                            -fwarn-unused-imports
  build-depends:                            base >= 4.7 && < 5

test-suite req-oauth2-test
  type:                                     exitcode-stdio-1.0
  default-language:                         Haskell2010
  hs-source-dirs:                           test
  main-is:                                  Spec.hs
  ghc-options:                              -threaded
                                            -rtsopts
                                            -with-rtsopts=-N
                                            -W
                                            -Wall
                                            -Werror=incomplete-patterns
                                            -Werror=missing-methods
                                            -fwarn-unused-imports
  build-depends:                            base >= 4.7 && < 5
                                          , hspec