How a Scope Moves Through the Flow
- You name a scope in your rules, with the fields it shares and the reason you ask.
- A rule’s
step_uprequirement names that scope and the keys the credential must prove. - When a request meets that rule, your server or baselayer.js answers with a step-up. It carries the requirement, with the scope’s
purposeandfields. - The agent asks its person to approve sharing those fields, and gets a credential minted with exactly them.
- Your token route checks the presented credential against the requirement. It holds every required key and shares exactly the scope’s fields, or it is refused.
Name a Scope
Scopes are part of your policy. Each has aname, a purpose the person reads on the consent screen, and the fields it shares:
"scope": "contact". See Scopes for the limits and the errors a replace can return.
Fields a Scope Can List
These are the details a credential can carry. The technical name is what a scope’sfields and disclosed_fields use.
A scope names person fields only for now. The business fields are for minting a business credential.
View all person fields
View all person fields
View all business fields
View all business fields
disclosed_fields and the acting person’s details go in actor_disclosed_fields, using the person field names.
Readable Values or Hashes
A credential can share a detail in one of two ways. The platform sets the mode when it mints:-
CLEARTEXT_AND_HASH(default) shares the requested paths. These can be readable values, likeemailoraddress.postal_code, and matching hashes, likehashes.email. -
HASH_ONLYshares only matching hashes. Each requested field is swapped for its hash:email→hashes.emailgiven_name→hashes.nameaddress.*→hashes.address
address.usps_validated,address.address_type, and details with no hash (birthdate,birth_year, residency).
sha256: followed by a hex digest of a normalized value. A site can compute the same hash from its own records and match a customer without ever receiving the value.
Which Fields Your Keys Can Back
The keys a requirement asks for decide which fields its scope may hold. The Level 3 keys back every field. Otherwise only a Level 2 field whose key is among them:GET /acceptance/policy lists every field a scope may name in available_fields, with the key that proves it. A policy that names a field the keys can’t back is refused with field_not_backed_by_keys.
Ask for the Fields
When your rules step up a request, answer with the step-up for that rule. Itsrequirement carries the scope’s purpose and fields:
Enforce the Requirement
The credential the agent presents back must hold every required key and share exactly the scope’s fields:- The shared fields are checked against the requirement. A requirement with no scope shares nothing beyond the keys.
- A credential is refused with
scope_violationif it lacks a required key or shares any field other than the scope’sfields. Answer with the step-up again, naming the keys it lacked inmissing_keys. - The whole credential is refused, so you only ever read what your step asks for.
- After the check, confirm the fields your step needs are present, then make your site’s decision.
Read the Fields
The shared fields are the credential’s disclosures, each at its dotted path, such ashashes.email. To decode them, see Disclosures.