NOTE: This repo got deprecated. We migrated to hydrogen.duct-template
It implements a module for Duct.
hydrogen.module.session.cognito
further enriches config provided by
hydrogen.module.core
to support AWS Cognito User Pools-based session management.
{:hydrogen.module/core {
;; core hydrogen config
}
:hydrogen.module/session.cognito {}}
- OIDC_ISSUER_URL
- OIDC_AUDIENCE
- OIDC_JWKS_URI
The module merges the following Integrant keys to system configuration:
:project-ns.api/config
: it provides the above env variables values to the front-end:magnet.buddy-auth/jwt-oidc
: it provides a function that implements:duct.middleware.buddy/authentication
compatible JWT token validation for OpenID Connect ID Tokens.:duct.middleware.buddy/authentication
: it provides a Ring-compatible middleware that enables authentication using OpenID Connect ID Tokens.
You will need to reference the :duct.middleware.buddy/authentication
key from the routes' handlers keys where you want to use authentication. E.g.:
- This module is used by Hydrogen CE and by Hydrogen duct template.
For this reason it usually starts with
:add-example-api? true
option to make running demo more effortless. The default for this option isfalse
so there's probably nothing for you to care about :)
Copyright (c) 2019 Magnet S Coop.
The source code for the library is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.