Expand description
Live API-key validation for Connectors → Accounts.
Each supported service has a probe that makes a single minimal authenticated request and maps the response to non-secret metadata (account name, scopes, etc.). This is the only outbound call the key flow makes, and it fires only on the user’s explicit Validate click (see docs/specs/archive/SPEC_TRUST_CENTER_2026_06_15.md §5.1, §6).
The plaintext key is passed in by value, used to build one request, and never logged. Callers must keep it out of logs/transcripts.
Structs§
- Validation
Outcome - Outcome of a validation probe.
metadatais non-secret JSON safe to persist on the account row + show in the UI;masked_tailis the last few chars for the locked display.
Constants§
- GOOGLE_
USERINFO_ URL - Google’s OpenID Connect userinfo endpoint: answers for any access token
that carries the
openidscope, with the account’s email.
Functions§
- masked_
tail - Masked hint for the locked display: bullet run + last 4 chars. Stored
alongside the account so the panel can render
••••••••3f9awithout the secret. Keys shorter than 4 chars are fully masked (no tail leak). - validate
- Validate
keyforprovider. Makes one outbound HTTPS request. Returns a non-validoutcome (never errors the RPC) so the caller can surface a structured message and stay in the entry state. A stored OAuth token blob is validated by its access token (oauth_tokens::bearer_value); an expired one should be refreshed first (oauth_tokens::access_token_for).