fastify-keycloak
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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 },
});

Readme

Keywords

Package Sidebar

Install

npm i fastify-keycloak

Weekly Downloads

28

Version

0.2.0

License

MIT

Unpacked Size

5.61 kB

Total Files

8

Last publish

Collaborators

  • ekoeryanto