Skip to main content

coqui_access/
methods.rs

1//! The words that name how a person proves who they are, as a sign-in policy and a consumer
2//! agree on them.
3//!
4//! A policy may use words of its own beside these; the ones here are what the providers of
5//! this repository and the consumers know.
6
7/// A name and a password.
8pub const PASSWORD: &str = "password";
9/// A client certificate whose key the transport verified.
10pub const CERTIFICATE: &str = "certificate";
11/// An identity a trusted reverse proxy vouches for.
12pub const PROXY: &str = "proxy";
13/// A bearer key that is the account.
14pub const KEY: &str = "key";
15/// A one-time code from an authenticator app.
16pub const TOTP: &str = "totp";
17/// A one-time recovery code made at enrolment.
18pub const RECOVERY_CODE: &str = "recovery_code";
19/// A passkey (WebAuthn): a signed answer to a challenge the provider issued. It names its own
20/// account, so it is offered before any step has named someone.
21pub const PASSKEY: &str = "passkey";
22
23/// Methods that check a code against an account already named, so nothing is offered of them
24/// until an earlier step has named someone.
25pub const NEEDS_ACCOUNT: &[&str] = &[TOTP, RECOVERY_CODE];