Coder Social home page Coder Social logo

hydrogen.module.session.cognito's Introduction

NOTE: This repo got deprecated. We migrated to hydrogen.duct-template

hydrogen.module.session.cognito for Duct

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.

Installation

Clojars Project

Usage

{:hydrogen.module/core {
  ;; core hydrogen config
}
 :hydrogen.module/session.cognito {}}
This module will need those env variables to be set in order to work properly:
  1. OIDC_ISSUER_URL
  2. OIDC_AUDIENCE
  3. OIDC_JWKS_URI

The module merges the following Integrant keys to system configuration:

  1. :project-ns.api/config: it provides the above env variables values to the front-end
  2. :magnet.buddy-auth/jwt-oidc: it provides a function that implements :duct.middleware.buddy/authentication compatible JWT token validation for OpenID Connect ID Tokens.
  3. :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.:

Additional options

  • 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 is false so there's probably nothing for you to care about :)

License

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/.

hydrogen.module.session.cognito's People

Contributors

weavejester avatar iarenaza avatar scottlowe avatar bgalartza avatar

Stargazers

merik avatar

Watchers

James Cloos avatar Damian Hryniewicz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.