Expand description
Kinds and models for authentication, identity lookup, authorization and account management, on Guatiao.
A host and every provider library compile against this crate and against nothing else
of each other. Providers name guatiao through [guatiao] (re-exported here), so the
two sides cannot drift to different versions.
| Kind | Name | Answers |
|---|---|---|
Authenticator | coqui_authenticator | Are these credentials valid, and which Lookup do they name? |
Directory | coqui_directory | Who is the Person behind a Lookup? |
Authorizer | coqui_authorizer | May this Person do this action on this resource? |
Accounts | coqui_accounts | Optional: list, put and remove accounts, list unaccepted peers. |
SignInPolicy | coqui_sign_in_policy | Which methods may this sign-in use, and what does it still need? |
Challenger | coqui_challenger | Optional: the challenge a method’s answer is bound to (a passkey’s). |
Every method is synchronous; a host calls a provider from a blocking thread. Kind names
and their floor hashes are an ABI, pinned by this crate’s contract test: a provider built
against one hash is refused by a host built against another. The hash covers every method
of a kind, optional ones included, so a kind that exists is never appended to: it is
extended by a new kind, and a model by an Option field.
Re-exports§
pub use kind::Accounts;pub use kind::Authenticator;pub use kind::Authorizer;pub use kind::Challenger;pub use kind::Directory;pub use kind::SignInPolicy;pub use guatiao;
Modules§
- attributes
- The names a consumer gives in
SignInContext::attributesthat a policy reads. - clients
- What kind of client signs in, as
SignInContext::clientsays. - error
- The refusals providers and hosts agree on, as [
ProviderError]s. - methods
- The words that name how a person proves who they are, as a sign-in policy and a consumer agree on them.
- purposes
- Why a sign-in policy is asked, as
SignInContext::purposesays. - takes
- What an authenticator takes, as
Description::takesnames it.
Structs§
- Account
Info - An account as a provider that keeps its own lists it; never with what proves it.
- Account
Put - An account to make, or what to change of one there is. A field not said is left as it is.
- Attempt
- Credentials and request facts presented to an authenticator.
- Authorization
Decision - Authorization result and provider-defined limits for the granted action.
- Authorization
Request - A resource-scoped authorization request.
- Challenge
- What a
Challengermade for one sign-in: a challenge the signed answer is bound to, and the text the client needs to answer it. - Challenge
Request - What a consumer asks a
Challengerfor. - Claims
- The identity an authenticator obtained, in full, for a matcher to tie to a directory account. A claim is what the credential says, not who the person is: the directory decides the account and its groups.
- Credential
Info - One credential of an account that holds several (a passkey), without anything that proves it.
- Description
- What an authenticator or a directory says it is.
- Factor
- One step of a sign-in that already succeeded.
- Limit
- At most a count, or no bound at all.
- Lookup
- An identity lookup key returned after an authenticator accepts credentials.
- Offer
- A method a sign-in may use next.
- Person
- A person record returned only by an authoritative directory.
- PutOutcome
- What came of putting an account.
- Sign
InContext - What a consumer knows when it asks which methods a sign-in may use, and what is still needed.
- Sign
InDecision - What a sign-in may do next.
- Subject
Error - Text that is not
account:<name>,person:<id>orgroup:<name>with a value that is not empty, holds no control character and neither starts nor ends with whitespace (inner spaces are fine:group:Domain Users), orany:signed-in. Any otherany:name is refused. - Waiting
- Something an authenticator was shown and did not know, kept so that whoever runs the service can accept it as an account.
Enums§
- Subject
- One account, person or group, written
account:<name>,person:<id>orgroup:<name>, or every signed-in person, writtenany:signed-in. - Verdict
- Result of checking one credential attempt.
Constants§
- KIND_
PREFIX - The prefix of every kind name in this crate. A host scanning a directory keeps the libraries that declare a kind beginning with it.
Traits§
- Accounts
- Account management for a provider that keeps its own accounts.
- Authenticator
- Checks credentials and returns only a
Lookupreference. - Authorizer
- Authorizes one action on one resource for a
Persona directory returned. - Challenger
- Issues what a method needs before it can be answered: for a passkey, a challenge the signed answer is bound to.
- Directory
- Resolves an authenticated reference into the authoritative
Personrecord. - Sign
InPolicy - Decides which methods a sign-in may use and what it still needs, from where and how it is made.