1.8.1 • Published 1 year ago

@universis/diploma-inspector v1.8.1

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
gitlab
Last release
1 year ago

Universis Diploma Inspector

Degree title verification services for Universis api server

Installation

npm i @universis/diploma-inspector

Configuration

Register DiplomaInspectorService in application services:

# app.production.json

"services": [
    ...,
    {
        "serviceType": "@universis/diploma-inspector#DiplomaInspectorService"
    }
]

Add the DiplomaInspectorSchemaLoader under universis api server schema/loaders section of application configuration:

{
  ...
  "schema": {
    "loaders": [
      ...
      { "loaderType": "@universis/diploma-inspector#DiplomaInspectorSchemaLoader"}
      ...
    ]
  }
  ...
}

Use settings/universis/diploma-inspector section to configure the usage of diploma inspector services:

 "diploma-inspector": {
    "scope": "diploma-inspector",
    "rateLimit": {
        "windowMs": 300000,
        "max": 5
    },
    "whitelist": [
      "127.0.0.1/24"
    ]
  }

scope

string

A string which represents an OAuth2 client scope that is going to be used while authenticating client.

rateLimit

object

@universis/diploma-inspector uses express-rate-limit configuration for limiting the amount of requests against services. The default values are:

  {
      windowMs: 300000, // 5 minutes
      max: 20, // 20 requests
      standardHeaders: true,
      legacyHeaders: false
  }

whitelist

string[]

@universis/diploma-inspector may be published with restricted access based on an array of ip ranges that be defined under whitelist attribute e.g.

"whitelist": [
  "127.0.0.1/24"
]

Important note: An empty array list disables ip-range check.

Configure Universis api origin

settings/universis/api#origin is being used by @universis/diploma-inspector documentation and may be configured if missing:

"settings": {
  ...
  "universis": {
    ...
    "api": {
      "origin": "https://api.example.com"
    }
  }
}

Configure Universis api proxy address forwarding

settings/universis/api#proxyAddressForwarding is being used by @universis/diploma-inspector in order to safely identify remote clients if universis api is running behind a reverse proxy:

"settings": {
  ...
  "universis": {
    ...
    "api": {
      "proxyAddressForwarding": true
    }
  }
}

Note: settings/universis/api#origin holds the public address of an instance of universis api server

Configure OAuth2 client

@universis/diploma-inspector router requires an OAuth2 confidential client which uses client_credentials grant type.

https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

1.8.1

1 year ago

1.8.0

1 year ago

1.2.0

1 year ago

1.6.4

1 year ago

1.5.5

1 year ago

1.6.3

1 year ago

1.5.4

1 year ago

1.6.2

1 year ago

1.5.3

1 year ago

1.7.0

1 year ago

1.6.1

1 year ago

1.5.2

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.6.8

1 year ago

1.6.7

1 year ago

1.6.6

1 year ago

1.6.5

1 year ago

1.5.6

1 year ago

1.1.20

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.12

2 years ago

1.1.10

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago