litchee 0.1.5

Async, builder-pattern Rust client for the Lichess API: full endpoint coverage, NDJSON streaming, and OAuth2 PKCE ('Log in with Lichess').
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Client-side errors from constructing or validating a PKCE flow.

/// An error raised while building or validating PKCE parameters.
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum PkceError {
    /// The code verifier length is outside the RFC 7636 range of `43..=128`.
    #[error("invalid code verifier length: {0} (must be between 43 and 128)")]
    InvalidVerifierLength(usize),

    /// The code verifier contains characters outside the allowed alphabet
    /// (`A-Z`, `a-z`, `0-9`, `-`, `.`, `_`, `~`).
    #[error("code verifier contains characters outside the unreserved set")]
    InvalidVerifierChars,
}