nextcloud_auth/lib.rs
1//! Credential types for the Nextcloud SDK.
2//!
3//! Every provider here implements [`nextcloud_sdk_core::AuthProvider`] and only
4//! mutates request headers, so callers stay generic over the credential
5//! format:
6//!
7//! - [`BasicAuth`] — user name plus app password, `Authorization: Basic`.
8//! - [`BearerAuth`] — OAuth2 access token, `Authorization: Bearer`.
9//! - [`Anonymous`] — no credentials, plus the `OCS-APIRequest` marker OCS
10//! endpoints require.
11//!
12//! Secrets are held in [`SecretString`], whose `Debug` output is redacted and
13//! which deliberately has neither a `Display` nor a `Serialize` impl.
14#![deny(missing_docs)]
15#![forbid(unsafe_code)]
16
17mod anonymous;
18mod basic;
19mod bearer;
20mod secret;
21
22pub use anonymous::Anonymous;
23pub use basic::{AppPassword, BasicAuth};
24pub use bearer::{BearerAuth, BearerToken};
25pub use secret::SecretString;