cas-server-pg-service-registrydeprecated

Provides a reference cas-server service registry backed by a PostgreSQL DB

Usage no npm install needed!

<script type="module">
  import casServerPgServiceRegistry from 'https://cdn.skypack.dev/cas-server-pg-service-registry';
</script>

README

cas-server-pg-service-registry

This module provides a reference implementation of a service registry plugin for cas-server.

Intializing the plugin requires a knex data source passed in via the phase one context.

Exported End Points

/pgServiceRegistry/addService

This plugin adds an endpoint to the CAS server that allows new services to be added -- /pgServiceRegistry/addService. This end point should be blocked from public access.

To add a new service simply POST a JSON object to the end point that matches:

{
  "name": "A service name",
  "comment": "A description of the service. Can be null.",
  "url": "http://a.service.url/"
}

Note: the URL can be a POSIX compliant regular expression. See the PostgreSQL documentation for more detail.

License

MIT License