0.7.0-alpha.1 • Published 3 months ago

@flink-app/management-api-plugin v0.7.0-alpha.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Flink API Docs

WORK IN PROGRESS 👷‍♀️👷🏻‍♂️

A FLINK plugin that lets you expose management api:s for other plugins.

Other plugins must be able to generate a ManagementApiModule that can be registered with this plugin to expose management apis.

Usage

Install plugin to your flink app project:

npm i -S @flink-app/management-api-plugin

Add and configure plugin in your app startup (probable the index.ts in root project):

import { managementApiPlugin } from "@flink-app/management-api-plugin";


function start() {
  new FlinkApp<AppContext>({
    name: "My app",
    plugins: [
        // Register plugin
        managementApiPlugin({
          token : "SECRET_TOKEN_USED_TO_COMMUNICATE_WITH_THE_API",
          jwtSecret : "JWT_SECRET_USED_TO_GENERATE_LOGGED_IN_TOKENS",
          modules : []
        })
    ],
  }).start();
}

Communicating with the management api

To work with the management api you must in the http header management-token send either the token specified when register the plugin or a user login token.

The management API have it's own users system, where you might add, edit or remove management users.

To create a first user to your management api make a POST request to /managementapi/managementapiuser with http-header management-token set to the specified token.

curl 'https://URL-TO-YOUR-API/managementapi/managementapiuser' \
    -H 'management-token: SECRET_TOKEN_USED_TO_COMMUNICATE_WITH_THE_API' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  --data-raw '{"username":"test","password":"test"}'
0.7.0-alpha.1

3 months ago

0.7.0-alpha.0

10 months ago

0.5.0

1 year ago

0.5.2

1 year ago

0.6.0

1 year ago

0.4.7

1 year ago

0.4.5

1 year ago

0.4.6

1 year ago

0.3.12

1 year ago

0.4.4

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.4.2

1 year ago

0.3.11

1 year ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.2

2 years ago

0.3.3

2 years ago

0.3.0

2 years ago

0.2.0-beta.15

3 years ago

0.2.0-beta.14

3 years ago

0.2.0-beta.11

3 years ago

0.2.0-beta.10

3 years ago

0.2.0-beta.9

3 years ago

0.2.0-beta.8

3 years ago

0.2.0-beta.7

3 years ago

0.2.0-beta.6

3 years ago

0.2.0-beta.5

3 years ago

0.2.0-beta.2

3 years ago

0.2.0-beta.1

3 years ago

0.2.0-beta.0

3 years ago

0.2.0-beta.3

3 years ago

0.2.0-alpha.36

3 years ago

0.2.0-alpha.35

3 years ago

0.2.0-alpha.33

3 years ago

0.2.0-alpha.31

3 years ago

0.2.0-alpha.28

3 years ago