rcpch / discourse-apim

RCPCH API key management within Discourse
MIT License
0 stars 0 forks source link

discourse-apim

RCPCH API access management within Discourse

Setup

Implemented

Roadmap

Data Model

Each row in the plugin UI is a combination of three Azure APIM concepts:

From now on if we refer to "User" below it can be both users that represent individuals on the free tier and a user representing a group.

The discourse plugion talks to the API management API directly:

To generate the list of APIs we combine the following API calls:

To display API keys we can use:

To request a new API key is two API calls:

We save the user IDs as a custom field on the appropriate Discourse user or group. This allows us to manually change them to accomodate those generated by hand in the Azure UI before this plugin was built.

We also need a list of additional subscription IDs so that we can calculate usage even if the subscription has been recreated or to accomodate subscriptions from a previous APIM instance in Azure.

To generate usage: