@hackage / servant-oauth2

A library for OAuth2 authentication in servant.

Latest0.1.0.1

About

Metadata

  • Last updated , by NoonSilk
  • License LicenseRef-OtherLicense
  • Categories Web Development
  • Maintained by: noon.vandersilk@tweag.io

  • Lottery factor: 0

Links

Installation

Readme

servant-oauth2

This is a modern servant wrapper around the 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