wizepass/lib.rs
1//! Rust client for the [WizePass](https://wizepass.com) API, version 2.
2//!
3//! WizePass is a passwordless authentication and identity management platform.
4//! This crate talks to the relying-party (`/rp`) and enrolment (`/es`) services
5//! over mutual TLS and covers four areas:
6//!
7//! - **Authentication** — prove a user's identity with the WizePass app.
8//! - **Signing** — have a user cryptographically sign a piece of text.
9//! - **Enrolment** — issue a new WizePass to a user.
10//! - **WizePass management** — list, search, revoke, and inspect licences.
11//!
12//! # Scope
13//!
14//! This crate speaks **API v2 exclusively**. There is no v1 support and no
15//! version negotiation: the version is a constant in the request path. A future
16//! v3 would arrive as a new major version of this crate rather than as
17//! `…RequestV3` types living alongside v2 ones.
18//!
19//! # Quick start
20//!
21//! The README's example follows, compiled as a doctest so it cannot go stale.
22#![doc = include_str!("../README.md")]
23#![forbid(unsafe_code)]
24
25// Implementation modules are private; the public surface is re-exported
26// explicitly from here as each one lands. That list is the crate's public-API
27// inventory — a review artifact, not just plumbing. Deliberately no `prelude`
28// module: `wizepass::Client` should be a real path.
29
30mod api;
31mod client;
32mod error;
33mod models;
34mod redact;
35
36pub mod deeplink;
37
38// The three dependencies whose types appear in this crate's public API are all
39// re-exported, so a consumer can name every type in a signature without adding a
40// dependency of their own — and cannot end up on a mismatched major version.
41
42/// Re-exported so the [`DateTime<Utc>`](chrono::DateTime) on
43/// [`Wizepass::created_on`](crate::Wizepass::created_on),
44/// [`EnrolmentServiceInfo::valid_until`](crate::EnrolmentServiceInfo::valid_until)
45/// and [`CertInfo`]'s validity window is nameable through this crate.
46///
47/// [`CertInfo`]: crate::CertInfo
48pub use chrono;
49/// Re-exported so the [`Version`](semver::Version) on
50/// [`InfoResponse::version`](crate::InfoResponse::version) — and the
51/// [`VersionReq`](semver::VersionReq) a compatibility check compares it against —
52/// are nameable through this crate.
53pub use semver;
54/// Re-exported so the [`Uuid`](uuid::Uuid) in every id type's public API —
55/// `as_uuid`, `From<Uuid>`, and `FromStr::Err` — is nameable through this crate.
56pub use uuid;
57
58pub use client::{Client, ClientBuilder};
59pub use error::{Error, Result, ServiceError};
60pub use models::{
61 AttributeSource, AuthenticationId, AuthenticationRequest, AuthenticationResult,
62 AuthenticationStatusResponse, BasicProfile, CertInfo, EnrolmentId, EnrolmentRequest,
63 EnrolmentResponse, EnrolmentServiceInfo, EnrolmentStatus, EnrolmentStatusResponse, EsId,
64 InfoResponse, InitiateAuthenticationResponse, InitiateSigningResponse, LicenceResponse, Page,
65 Platform, RequestAttribute, RequestContent, RequestedAttributes, RevokeRequest, RpId,
66 SearchAttribute, Secret, SignatureId, SigningRequest, SigningResult, SigningStatusResponse,
67 Status, Tag, UserAttributes, UserIdentifierAttribute, Wizepass, WizepassId, WizepassState,
68};