cabal-version:      2.4
name:               hoauth2

-- http://wiki.haskell.org/Package_versioning_policy
version:            2.11.0
synopsis:           Haskell OAuth2 authentication client
description:
  This is Haskell binding of OAuth2 Authorization framework and Bearer Token Usage framework.

homepage:           https://github.com/freizl/hoauth2
license:            MIT
license-file:       LICENSE
author:             Haisheng Wu
maintainer:         Haisheng Wu <freizl@gmail.com>
copyright:          Haisheng Wu
category:           Network
build-type:         Simple
stability:          Beta
tested-with:        GHC <=9.6.1
extra-source-files: README.org

source-repository head
  type:     git
  location: git://github.com/freizl/hoauth2.git

library
  hs-source-dirs:     src
  default-language:   Haskell2010
  autogen-modules:    Paths_hoauth2
  other-modules:
    Network.HTTP.Client.Contrib
    Network.OAuth.OAuth2.Internal
    Network.OAuth2.Experiment.Grants
    Network.OAuth2.Experiment.Utils
    Paths_hoauth2

  exposed-modules:
    Network.OAuth.OAuth2
    Network.OAuth.OAuth2.AuthorizationRequest
    Network.OAuth.OAuth2.HttpClient
    Network.OAuth.OAuth2.TokenRequest
    Network.OAuth2.Experiment
    Network.OAuth2.Experiment.Flows.AuthorizationRequest
    Network.OAuth2.Experiment.Flows.DeviceAuthorizationRequest
    Network.OAuth2.Experiment.Flows.RefreshTokenRequest
    Network.OAuth2.Experiment.Flows.TokenRequest
    Network.OAuth2.Experiment.Flows.UserInfoRequest
    Network.OAuth2.Experiment.Grants.AuthorizationCode
    Network.OAuth2.Experiment.Grants.ClientCredentials
    Network.OAuth2.Experiment.Grants.DeviceAuthorization
    Network.OAuth2.Experiment.Grants.JwtBearer
    Network.OAuth2.Experiment.Grants.ResourceOwnerPassword
    Network.OAuth2.Experiment.Pkce
    Network.OAuth2.Experiment.Types

  default-extensions:
    DeriveGeneric
    GeneralizedNewtypeDeriving
    ImportQualifiedPost
    InstanceSigs
    OverloadedStrings
    PolyKinds
    RecordWildCards
    TypeFamilies

  build-depends:
    , aeson                 >=2.0    && <2.3
    , base                  >=4.11   && <5
    , base64                ^>=0.4
    , binary                >=0.8    && <0.11
    , bytestring            >=0.9    && <0.13
    , containers            >=0.6    && <0.8
    , cryptonite            ^>=0.30
    , data-default          ^>=0.7
    , exceptions            >=0.8.3  && <0.11
    , http-conduit          >=2.1    && <2.4
    , http-types            >=0.11   && <0.13
    , memory                ^>=0.18
    , microlens             ^>=0.4.0
    , text                  >=2.0    && <2.3
    , transformers          >=0.4    && <0.7
    , uri-bytestring        >=0.2.3  && <0.4
    , uri-bytestring-aeson  ^>=0.1

  ghc-options:
    -Wall -Wtabs -Wno-unused-do-bind -Wunused-packages -Wpartial-fields
    -Wwarn -Wwarnings-deprecations

test-suite hoauth-tests
  type:               exitcode-stdio-1.0
  main-is:            Spec.hs
  hs-source-dirs:     test
  ghc-options:        -Wall
  build-depends:
    , aeson           >=2.0   && <2.3
    , base            >=4.11  && <5
    , hoauth2
    , hspec           >=2     && <3
    , uri-bytestring  >=0.2.3 && <0.4

  other-modules:      Network.OAuth.OAuth2.TokenRequestSpec
  default-language:   Haskell2010
  default-extensions:
    ImportQualifiedPost
    OverloadedStrings

  build-tool-depends: hspec-discover:hspec-discover >=2 && <3
  ghc-options:
    -Wall -Wtabs -Wno-unused-do-bind -Wunused-packages -Wpartial-fields
    -Wwarn -Wwarnings-deprecations