JSPM

@dediapp/matrix-identity-server

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q82692F
  • License AGPL-3.0-or-later

Matrix Identity Server

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 (c) 2023-present DediApp https://dedim.com.tr

License: GNU AFFERO GENERAL PUBLIC LICENSE