Skip to main content

BOT_DID_CREDENTIALS

Constant BOT_DID_CREDENTIALS 

Source
pub const BOT_DID_CREDENTIALS: &[(&str, Credential)];
Expand description

The credential each of those methods accepts.

createAccount is Credential::Creator: the credential names the account creating, in any of the three shapes tree::prove resolves, and createSession is Credential::Proof, the two of those that are not a session. updateCredentials is Credential::KeyProofOrOperator: a JWT one of the account’s keys signed, or the operator session. Every account-lifecycle mutation names an account that already exists and so takes Credential::AccountSelf — an agent acting on itself, the only caller this server can authenticate for them. The four authorization-decision routes take it for the same reason from the other side: they name no account at all, and the account they act on is the one the presented token authenticates as, so a decision can only ever be read, approved or declined by the agent it was addressed to. createBrowserSignIn takes it the same way, and signs a browser in as that account alone. The four reads are Credential::Disclosure: public by default, narrowable per route, never widenable. pollOperatorClaim is Public because it confers nothing — see the auth module’s doc. parkKey and describeParkedKey are Public for the same reason: a park mints nothing until the operator admits it from their own side, and both are bounded per address rather than by a credential.