Matrix Identity Server
npm install @dediapp/matrix-identity-serverNode.js library that implements
Matrix Identity Service API.
Example using express:
``js
import express from 'express'
import IdServer from '@dediapp/matrix-identity-server'
// if configuration is in default file (/etc/dedi/identity-server.conf)
const idServer = new IdServer()
// else if configuration is in a different file, set DEDI_IDENTITY_SERVER_CONF
process.env.DEDI_IDENTITY_SERVER_CONF = '/path/to/config/file'
const idServer = new IdServer()
// You can also give configuration directly
const idServer = new IdServer(config)
const app = express()
idServer.ready.then(() => {
Object.keys(idServer.api.get).forEach((k) => {
app.get(k, idServer.api.get[k])
})
Object.keys(idServer.api.post).forEach((k) => {
app.post(k, idServer.api.get[k])
})
app.listen(3000)
})
``
Configuration file is a JSON file. The default values are
in src/config.json.
Copyright (c) 2023-present DediApp
License: GNU AFFERO GENERAL PUBLIC LICENSE