Class PolicyToolAuthorizer
- Namespace
- Emissary
- Assembly
- Emissary.dll
An IToolAuthorizer backed by a fixed set of granted policy names.
public sealed class PolicyToolAuthorizer : IToolAuthorizer
- Inheritance
-
PolicyToolAuthorizer
- Implements
- Inherited Members
Constructors
PolicyToolAuthorizer(params string[])
Creates an authorizer granting exactly the given policies.
public PolicyToolAuthorizer(params string[] grantedPolicies)
Parameters
grantedPoliciesstring[]The policy names the caller holds.
Methods
IsAuthorized(ToolDefinition)
Whether the current caller may use the tool.
public bool IsAuthorized(ToolDefinition tool)
Parameters
toolToolDefinitionThe tool, including its RequiredPolicy.