Graphorin API reference v0.8.0
Graphorin API reference / @graphorin/channels / / ChannelAccessController
Interface: ChannelAccessController
Defined in: packages/channels/src/access.ts:107
The access controller consumed by the gateway. approve and revoke are the operator surface (CLI / REST wiring is application-side).
Stable
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
policy | readonly | ChannelAccessPolicyKind | packages/channels/src/access.ts:108 |
Methods
approve()
approve(channelId, code): Promise<
| PairedPeerRecord
| null>;Defined in: packages/channels/src/access.ts:116
Operator approval of a pairing code. One-time: consumes the request and durably pairs the peer. Returns null when the code is unknown or expired (an expired code is also deleted).
Parameters
| Parameter | Type |
|---|---|
channelId | string |
code | string |
Returns
Promise< | PairedPeerRecord | null>
check()
check(identity): Promise<ChannelAccessDecision>;Defined in: packages/channels/src/access.ts:110
Evaluate one inbound identity. Deterministic given store state + clock.
Parameters
| Parameter | Type |
|---|---|
identity | ChannelIdentity |
Returns
Promise<ChannelAccessDecision>
listPaired()
listPaired(channelId?): Promise<readonly PairedPeerRecord[]>;Defined in: packages/channels/src/access.ts:120
List durably paired peers (operator surface).
Parameters
| Parameter | Type |
|---|---|
channelId? | string |
Returns
Promise<readonly PairedPeerRecord[]>
revoke()
revoke(peer): Promise<void>;Defined in: packages/channels/src/access.ts:118
Remove a durably paired peer.
Parameters
| Parameter | Type |
|---|---|
peer | PairingPeerRef |
Returns
Promise<void>