@mashroom/mashroom-http-proxy-add-access-token

2.6.1 • Public • Published

Mashroom Add Access Token Http Proxy Interceptor

Plugin for Mashroom Server, a Microfrontend Integration Platform.

If you add this plugin it will add the access token from the OpenId Connect plugin to every backend call.

Usage

If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-csrf-protection as dependency.

You can override the default config in your Mashroom config file like this:

{
  "plugins": {
        "Mashroom Http Proxy Add Access Token Interceptor": {
            "addBearer": false,
            "accessTokenHeader": "X-USER-ACCESS-TOKEN",
            "targetUris": [".*"]
        }
    }
}
  • addBearer: Add the token as authorization bearer header (Default: true)
  • accessTokenHeader: The HTTP header for the access token - has no effect if addBearer is true (Default: X-USER-ACCESS-TOKEN)
  • targetUris: A list of regular expressions that match URIs that should receive the headers (Default: [.*])

Readme

Keywords

none

Package Sidebar

Install

npm i @mashroom/mashroom-http-proxy-add-access-token

Weekly Downloads

0

Version

2.6.1

License

MIT

Unpacked Size

6.87 kB

Total Files

5

Last publish

Collaborators

  • jkofler