It implements a module for Duct.
hydrogen.module.session.keycloak manages communication between Hydrogen app and
a Keycloak server in order provide session management.
{:hydrogen.module/core {}
:hydrogen.module/session.keycloak {}}
And a more realistic example:
{:hydrogen.module/core
{:externs-paths {:production ["src/my-app/client/externs.js"
"src/my-app/client/google_maps_api_v3_36.js"]
:development ["oksol/client/google_maps_api_v3_36.js"]}}
:hydrogen.module/session.keycloak {}}
The module merges the following 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.:
:externs-paths option. It accepts two formats:
{:externs-paths ["a.js" "b.js"]} - this would apply both files as externs both in development environment
(as part of :duct.server/figwheel config)
and in production environment
(as part of :duct.compiler/cljs config).{:externs-paths {:production ["a.js"] :development ["x.js" "y.js"]}}: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 :)Figwheel expects files with .js extension inside its source directories to be a foreign library. And foreign libraries MUST declare a namespace. In fact, figwheel assumes it, and if it doesn't find it and can't map the file back to a source file, it bombs out with a NullPointerException.
So even if this is NOT a foreign library, but just an externs file, add a namespace declaration to prevent figwheel from crashing.
Like this: goog.provide('google.maps');
Copyright (c) Magnet S Coop 2019.
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/.
Can you improve this documentation? These fine people already did:
Iñaki Arenaza & Damian HryniewiczEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |