Constructor
new TrustPlugin(policies, modeopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
policies | Array.<module:kadence/trust~TrustPlugin~policy> | |||
mode | number | <optional> | TrustPlugin.MODE_BLACKLIST | Blacklist or whitelist |
- Source
Members
(static) MODE_BLACKLIST
Mode flag passed to TrustPlugin to place into blacklist mode
- Source
(static) MODE_WHITELIST
Mode flag passed to TrustPlugin to place into whitelist mode
- Source
Methods
addTrustPolicy(policy) → {TrustPlugin}
Adds a new trust policy
Parameters:
Name | Type | Description |
---|---|---|
policy | module:kadence/trust~TrustPlugin~policy |
- Source
Returns:
- Type:
- TrustPlugin
getTrustPolicy(identity) → {module:kadence/trust~TrustPlugin~policy|null}
Returns the trust policy for the given identity
Parameters:
Name | Type | Description |
---|---|---|
identity | string | | Identity key for the policy |
- Source
Returns:
- Type:
- module:kadence/trust~TrustPlugin~policy |
null
removeTrustPolicy(identity) → {TrustPlugin}
Removes an existing trust policy
Parameters:
Name | Type | Description |
---|---|---|
identity | string | | Trust policy to remove |
- Source
Returns:
- Type:
- TrustPlugin
Type Definitions
policy
Type:
Properties- object
Name | Type | Description |
---|---|---|
identity | string | | Node identity key |
methods | Array.<string> | Methods, wildcard (*) supported for all |
- Source