user_codex_auth
Private, self-service Codex account linking for one resolved Star identity.
Only non-secret enrollment metadata is persisted here. The Codex backend owns
all provider credentials and login state; Redis records only the opaque account
generation needed to bind a later !gpt route to the same person.
- class user_codex_auth.CodexAccountLink(version, account_id, connected_at)
Bases:
objectThe complete non-secret Redis representation of one linked account.
alias of
CodexAuthStoreUnavailable
Bases:
RuntimeErrorCodex enrollment state could not be read or changed safely.
- exception user_codex_auth.CodexCommandError
Bases:
ValueErrorA safe, user-facing
!codexgrammar error.
- async user_codex_auth.clear_codex_account_link(redis, subject)
Remove exactly one canonical user’s non-secret enrollment record.
- async user_codex_auth.clear_user_codex_account(redis, subject)
Remove exactly one canonical user’s non-secret enrollment record.
- user_codex_auth.codex_account_redis_key(subject)
Return the per-canonical-subject enrollment key.
- async user_codex_auth.get_codex_account_link(redis, subject)
Read one link, failing closed on unavailable or malformed state.
- Return type:
- Parameters:
- async user_codex_auth.get_user_codex_account(redis, subject)
Read one link, failing closed on unavailable or malformed state.
- Return type:
- Parameters:
- async user_codex_auth.handle_codex_command(processor, msg, platform)
Execute private enrollment and owner-controlled quota-sharing commands.
- user_codex_auth.is_private_codex_channel(msg)
Require an authenticated native DM or exact user-owned webchat channel.
- user_codex_auth.parse_codex_command(text)
Parse the exact private enrollment and quota-sharing grammar.
- Return type:
- Parameters:
text (str)
- async user_codex_auth.set_codex_account_link(redis, subject, link)
Persist exactly the approved non-secret link fields without a TTL.
- Return type:
- Parameters:
redis (Any)
subject (str)
link (CodexAccountLink)
- async user_codex_auth.set_user_codex_account(redis, subject, link)
Persist exactly the approved non-secret link fields without a TTL.
- Return type:
- Parameters:
redis (Any)
subject (str)
link (CodexAccountLink)