name:               oidc-client
version:            0.1.0.1
synopsis:           OpenID Connect 1.0 library for RP
homepage:           https://github.com/krdlab/haskell-oidc-client
stability:          experimental
license:            MIT
license-file:       LICENSE
author:             Sho Kuroda
maintainer:         Sho Kuroda <krdlab@gmail.com>
copyright:          (c) 2015 Sho Kuroda
category:           Web
build-type:         Simple
cabal-version:      >=1.10
description:
    This package supports implementing of an OpenID Connect 1.0 Relying Party.
    .
    Examples: <https://github.com/krdlab/haskell-oidc-client/tree/master/examples>

source-repository head
    type: git
    location: git://github.com/krdlab/haskell-oidc-client.git

flag network-uri
  default: True

flag build-examples
  default: False

library
  hs-source-dirs:      src
  default-language:    Haskell2010
  exposed-modules:
      Web.OIDC.Client
    , Web.OIDC.Discovery
    , Web.OIDC.Discovery.Issuers
  other-modules:
      Web.OIDC.Client.Internal
    , Web.OIDC.Types
  build-depends:
      base              >=4.7 && <5
    , bytestring        >=0.10 && <0.11
    , text              >=1.2 && <1.3
    , aeson             >=0.9
    , attoparsec        >=0.12
    , exceptions
    , http-client
    , tls               >=1.3.2
    , http-client-tls
    , jose-jwt          >=0.6.2 && <0.7
    , time
    , crypto-random
  if flag(network-uri)
    build-depends: network-uri >=2.6, network >=2.6
  else
    build-depends: network-uri <2.6, network <2.6

test-suite oidc-client-spec
  type:                 exitcode-stdio-1.0
  hs-source-dirs:       test
  default-language:     Haskell2010
  ghc-options:          -Wall
  main-is:              Spec.hs
  build-depends:
      base
    , hspec
    , oidc-client

executable scotty-example
  main-is:          Main.hs
  hs-source-dirs:   examples/scotty/
  if flag(build-examples)
    build-depends:
        base                >=4.7 && <5
      , oidc-client
      , bytestring
      , text
      , containers
      , transformers
      , wai-extra
      , scotty
      , scotty-cookie
      , blaze-html
      , cprng-aes
      , crypto-random
      , base32-bytestring
      , http-types
      , http-client
      , tls                 >=1.3.2
      , http-client-tls
  else
    buildable: False