AccountsAdminServices
tai42_contract.accounts.provider.AccountsAdminServices
AccountsProviderSettings.admin — accounts plugins never import the
application package, so this Protocol is the only way plugin code can
apply a role template, remove a principal’s policy, or flip the disabled
marker. Every method mutates application-owned policy state; the plugin
never touches that state directly.
Members
apply_role
tai42_contract.accounts.provider.AccountsAdminServices.apply_role
remove_policy
tai42_contract.accounts.provider.AccountsAdminServices.remove_policy
set_user_disabled
tai42_contract.accounts.provider.AccountsAdminServices.set_user_disabled
AccountsProvider
tai42_contract.accounts.provider.AccountsProvider
validate_token — the
same seam every credential passes through — so installing an accounts
provider never adds a second enforcement pathway.
Session tokens are opaque strings minted and stored by the provider
(recommended prefix tai-sess- to distinguish them from sk- API
keys at a glance); the contract never parses token contents. Storage,
hashing, and lifetime are provider-owned.
Login/lifecycle HTTP routes (submit endpoints, redirect flows) are
shipped by the provider plugin as ordinary router modules; the contract
carries only the metadata that lets a generic login screen render them.
Members
login_methods
tai42_contract.accounts.provider.AccountsProvider.login_methods
readiness_targets).
needs_bootstrap
tai42_contract.accounts.provider.AccountsProvider.needs_bootstrap
False.
revoke_session
tai42_contract.accounts.provider.AccountsProvider.revoke_session
token if it is this provider’s.
Returns True when a session was found and revoked; False
when the token is not this provider’s (wrong prefix, unknown). The
application’s single logout route dispatches across ALL registered
accounts providers, so implementations must answer False for
foreign tokens instead of raising. Backend errors still raise
(fail closed).
Parameters
AccountsProviderSettings
tai42_contract.accounts.provider.AccountsProviderSettings
redis and admin are typed loosely for the same reason
IdentityProviderSettings.redis is Any: the contract cannot name
application or kit types. admin carries the application’s
AccountsAdminServices implementation.
Attributes
ButtonMethod
tai42_contract.accounts.models.ButtonMethod
FormField
tai42_contract.accounts.models.FormField
FormMethod
tai42_contract.accounts.models.FormMethod
LoginMethod
tai42_contract.accounts.models.LoginMethod
get_accounts_provider_factory
tai42_contract.accounts.registry.get_accounts_provider_factory
name; unknown names raise KeyError.
Parameters
iter_accounts_provider_factories
tai42_contract.accounts.registry.iter_accounts_provider_factories
register_accounts_provider
tai42_contract.accounts.registry.register_accounts_provider
factory here and — because an accounts provider is the
identity answerer for its own session tokens — into the identity
registry under the same name. A duplicate in either registry raises.
Parameters
reset_registry
tai42_contract.accounts.registry.reset_registry

