@hackage servant-oauth20.1.0.1
A library for OAuth2 authentication in servant.
Categories
License
LicenseRef-OtherLicense
Maintainer
noon.vandersilk@tweag.io
Links
- Homepage
- Documentation
- No source repository
- Security
Versions
Installation
Dependencies (21)
- base >=4.7 && <5
- base64-bytestring
- binary
- bytestring
- clientsession
- cookie Show all…
Dependents (1)
@hackage/servant-oauth2-examples
servant-oauth2
This is a modern servant wrapper around the wai-middleware-auth OAuth2 provider implementations.
Hacking
./hack example-basic
./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
- Document exported functions
- More detailed readme documentation
- Build in an example of 'Authorisation'; i.e. lifting the logins to the type-level
- Show an example of multiple auths (distinguish by type)
- See if we can get away with only doing it for
complete - Pass settings through somehow
- Try and hide away as much details as possible
- Define a basic structure following
AuthProtect