fastify-keycloak
v0.2.0
Published
Fastify Keycloak connect integration.
Downloads
115
Readme
Fastify Keycloak Connect
Fastify plugin for keycloak (Identity and Access Management Solution)
Usage
With fastify secure session
const fastifyKeycloak = require("fastify-keycloak");
const store = fastify.createSecureSession({});
fastify.register(fastifyKeycloak, {
options: { store },
middleware: { logout: "/leave" },
});
With fastify session
const fastifyKeycloak = require("fastify-keycloak");
const fastifySession = require("fastify-session");
const Store = require("fastify-session/lib/store");
const store = new Store();
fastify.register(fastifySession, { store });
fastify.register(fastifyKeycloak, {
options: { store },
});
With fastify cookie only
const fastifyKeycloak = require("fastify-keycloak");
const Cookie = require("fastify-cookie");
fastify.register(fastifyKeycloak, {
options: { cookies: true },
});