@twin.org/api-tenant-processor
Version:
API Tenant Processor for converting and api key to a tenant id.
80 lines (40 loc) • 928 B
Markdown
Class: TenantIdContextIdHandler
Context Id handler for testing as a tenant id.
# Implements
- `IContextIdHandler`
# Constructors
## Constructor
**new TenantIdContextIdHandler**(): `TenantIdContextIdHandler`
### Returns
`TenantIdContextIdHandler`
# Properties
## CLASS\_NAME
`readonly` `static` **CLASS\_NAME**: `string`
Runtime name for the class.
# Methods
## short()
**short**(`value`): `string`
The short form of the tenant id is the same as the full version.
### Parameters
#### value
`string`
The full context id value.
### Returns
`string`
Short form string.
### Implementation of
`IContextIdHandler.short`
***
## guard()
**guard**(`value`): `void`
Guard the value ensuring length.
### Parameters
#### value
`string`
The value to guard.
### Returns
`void`
### Throws
GeneralError if the value is too short.
### Implementation of
`IContextIdHandler.guard`