UNPKG

moleculer-iam

Version:

Centralized IAM module for moleculer. Including a certified OIDC provider and an Identity provider for user profile, credentials, and custom claims management. Custom claims could be defined/updated by declarative schema which contains claims validation a

20 lines (16 loc) 511 B
"use strict"; const TABLE = "IdentityCache"; module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.sequelize.query(` create or replace view ${TABLE} as ( select c.id, c.data claims, m.data metadata, c.createdAt, c.updatedAt from IdentityClaimsCache c inner join IdentityMetadata m on c.id = m.id ); `); }, down: async (queryInterface, Sequelize) => { await queryInterface.sequelize.query(` drop view if exists ${TABLE} `); }, };