Package Exports
- @dediapp/matrix-identity-server
Readme
@dediapp/matrix-identity-server
Node.js library that implements Matrix Identity Service API.
Synopsis
Example using express:
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
Configuration file is a JSON file. The default values are in src/config.json.
Copyright and license
Copyright (c) 2023-present DediApp https://dedim.com.tr
License: GNU AFFERO GENERAL PUBLIC LICENSE