yesod-auth-oidc: A yesod-auth plugin for multi-tenant SSO via OpenID Connect

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

A yesod-auth plugin for multi-tenant SSO via OpenID Connect, using Authorization Code flow (AKA server flow). Please see the README.md file for more documentation.


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.1, 0.1.3, 0.1.3, 0.1.4
Change log None available
Dependencies aeson (>=2.0.0.0 && <3.0), base (>=4.9.1.0 && <5), base64-bytestring (>=1.1.0 && <1.3), classy-prelude-yesod (>=1.5.0 && <1.6), containers, cryptonite (>=0.28 && <1), http-client (>=0.6.4 && <1), jose-jwt (>=0.9.2 && <0.10), oidc-client (>=0.6.0 && <0.8), shakespeare (>=2.0.25 && <2.2), text (>=1.2.4 && <3.0), time (>=1.9.3 && <2.0), unordered-containers (>=0.2.13 && <0.3), yesod-auth (>=1.6.10 && <1.7), yesod-core (>=1.6.19 && <1.7), yesod-form (>=1.6.7 && <2.0) [details]
License BSD-3-Clause
Author Supercede Technology Ltd
Maintainer Supercede Technology Ltd <support@supercede.com>
Category Web, Yesod
Home page https://github.com/SupercedeTech/yesod-auth-oidc
Source repo head: git clone git@github.com:SupercedeTech/yesod-auth-oidc.git
Uploaded by Jappie at 2023-06-14T20:13:40Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for yesod-auth-oidc-0.1.3

[back to package description]

yesod-auth-oidc

A Yesod authentication plugin for multi-tenant Single Sign-on (SSO) via OpenID Connect (OIDC Core 1.0), using Authorization Code flow (defined in ยง3.1, AKA server flow).

Using the library

This library abstracts many details of OIDC for you, but you may need to understand the basics of OIDC to integrate this with your app. The steps are:

  1. Implement the YesodAuthOIDC class for your Yesod App. See the Haddocks for documentation.

  2. Add Yesod.Auth.OIDC.authOIDC to your list of authPlugins.

  3. Add the Yesod.Auth.OIDC.oidcSessionExpiryMiddleware to your WAI middleware. This ensures the user is logged out upon the token's expiry. You should be able to implement something more fancy than a hard logout without modifying this libary.

  4. Add some extra UI logic for choosing between login methods if you have more than one auth plugin. Yesod provides some defaults here for getting started.

Also see this library's test suite, especially test/ExampleApp.hs and test/Yesod/Auth/OIDCSpec.hs.

Relation to other Haskell libraries

Limitations

Development

The maintainers typically run nix-shell and then use GHCi or cabal from there.