homepage: https://github.com/tweag/servant-oauth2#readme
changelog-type: ''
hash: 72e20defcb61322f5b5df604cd1af747e076737f09728e6aa83485013dabeefe
test-bench-deps: {}
maintainer: noon.vandersilk@tweag.io
synopsis: A library for OAuth2 authentication in servant.
changelog: ''
basic-deps:
  shakespeare: -any
  warp: -any
  cookie: -any
  exceptions: -any
  bytestring: -any
  clientsession: -any
  wai: -any
  base: '>=4.7 && <5'
  hoauth2: -any
  base64-bytestring: -any
  unordered-containers: -any
  text: -any
  servant-server: -any
  servant: -any
  uri-bytestring: -any
  servant-blaze: -any
  binary: -any
  mtl: -any
  wai-middleware-auth: -any
  http-types: -any
  tomland: -any
all-versions:
- 0.1.0.0
author: Tweag
latest: 0.1.0.0
description-type: markdown
description: |
  # servant-oauth2

  This is a modern servant wrapper around the
  [wai-middleware-auth](https://github.com/fpco/wai-middleware-auth) OAuth2
  provider implementations.


  #### Hacking

  Simplest example:

  ```
  ./hack example-basic
  ```

  Cookie example:
  ```
  ./hack example-cookies
  ```

  Example that performs "authorisation" (i.e. there is an 'admin' section):
  ```
  ./hack example-auth
  ```

  #### Before running

  You'll need to make a GitHub OAuth application, and a Google one, if you want
  to test that as well.

  The details of which you'll need to place in `./config.toml`. See
  `./config.example.toml` for an example.

  The most important detail is that the callback URL on github, and in the
  config, is set to the same thing:

  ```
  http://localhost:8080/auth/github/complete
  ```

  #### Todo

  - [ ] Contributing guide
  - [x] Document exported functions
  - [x] More detailed readme documentation
  - [x] Build in an example of 'Authorisation'; i.e. lifting the logins to the type-level
  - [x] Show an example of multiple auths (distinguish by type)
  - [x] See if we can get away with only doing it for `complete`
  - [x] Pass settings through somehow
  - [x] Try and hide away as much details as possible
  - [x] Define a basic structure following `AuthProtect`
license-name: LicenseRef-OtherLicense

Update from Hackage at 2022-07-18T09:57:37Z
Update from Hackage at 2022-07-18T09:57:37Z
