@mashroom/mashroom-security-provider-basic-wrapper

2.6.1 • Public • Published

Mashroom Basic Authentication Wrapper Security Provider

Plugin for Mashroom Server, a Microfrontend Integration Platform.

This plugin adds support for Basic authentication to any other security provider that implements login() properly. This can be useful when you need to access some APIs on the server from an external system or for test purposes.

Usage

If node_modules/@mashroom is configured as plugin path just add @mashroom/mashroom-security-provider-basic-wrapper as dependency.

To activate this provider configure the Mashroom Security plugin like this:

{
    "plugins": {
        "Mashroom Security Services": {
            "provider": "Mashroom Basic Wrapper Security Provider"
        }
    }
}

And configure this plugin like this in the Mashroom config file:

{
  "plugins": {
        "Mashroom Basic Wrapper Security Provider": {
             "targetSecurityProvider": "Mashroom Security Simple Provider",
             "onlyPreemptive": true,
             "realm": "mashroom"
        }
    }
}
  • targetSecurityProvider: The actual security provider that is used to login (Default: Mashroom Security Simple Provider)
  • onlyPreemptive: Only use BASIC if it is sent preemptively if true. Otherwise, the plugin will send HTTP 401 and WWW-Authenticate which will trigger the Browser's login popup (Default: true)
  • realm: The realm name that should be used if onlyPreemptive is false (Default: mashroom)

Readme

Keywords

none

Package Sidebar

Install

npm i @mashroom/mashroom-security-provider-basic-wrapper

Weekly Downloads

3

Version

2.6.1

License

MIT

Unpacked Size

8.46 kB

Total Files

5

Last publish

Collaborators

  • jkofler