You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(docs): add Resource constructor helpers and update examples
Document the new Resource helper functions (ForAttributeValues,
ForRegisteredResourceValueFqn) for Go, Java, and JavaScript SDKs.
Update GetDecision examples to use the helpers instead of verbose
manual proto construction.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Mary Dickson <mary.dickson@virtru.com>
-**Claims** are used by the Entity Resolution Service (ERS) for custom claim-based entity resolution.
191
191
-**Registered Resource** identifies an entity by a [registered resource](/components/policy/registered_resources) value FQN stored in platform policy, where the resource acts as a single entity for authorization decisions.
192
192
193
+
### Resource
194
+
195
+
A `Resource` identifies the data being accessed in [GetDecision](#getdecision) and [GetDecisionBulk](#getdecisionbulk) calls. It can be specified as a set of attribute value FQNs (most common — e.g. the attributes on a TDF) or as a [registered resource](/components/policy/registered_resources) value FQN stored in platform policy.
196
+
197
+
<Tabs>
198
+
<TabItemvalue="go"label="Go">
199
+
200
+
| Helper | Description |
201
+
|--------|-------------|
202
+
|`authorizationv2.ForAttributeValues(fqns...)`| Resource from attribute value FQNs (e.g. those on a TDF) |
203
+
|`authorizationv2.ForRegisteredResourceValueFqn(fqn)`| Resource from a registered resource value FQN in policy |
The helpers do not set `ephemeralId`. For [GetDecisionBulk](#getdecisionbulk) where you need to correlate requests with responses, set `ephemeralId` separately after construction or use manual construction.
|`entityIdentifier`|`EntityIdentifier`| Yes | The entity requesting access. Use [helpers](#entityidentifier) like `ForEmail(...)` (Go) or `EntityIdentifiers.forEmail(...)` (Java/JS). |
421
549
|`action`|`Action`| Yes | The action being performed (e.g., `decrypt`, `read`). |
422
-
|`resource`|`Resource`| Yes | The resource being accessed, identified by attribute value FQNs. |
550
+
|`resource`|`Resource`| Yes | The resource being accessed. Use [helpers](#resource) like `ForAttributeValues(...)` (Go) or `Resources.forAttributeValues(...)` (Java/JS). |
@@ -912,29 +1019,38 @@ Identifies the data being accessed. A resource can be specified in two ways:
912
1019
|`attributeValues.fqns`|`[]string`| Attribute value FQNs on the resource (1–20). Use this for TDF payloads or any resource identified by attribute values. |
913
1020
|`registeredResourceValueFqn`|`string` (URI) | A [registered resource](/components/policy/registered_resources) value FQN stored in platform policy. Alternative to `attributeValues`. |
914
1021
1022
+
Use the [Resource helpers](#resource) for concise construction:
0 commit comments