ppoppo-sdk-core 0.2.0

Internal shared primitives for the Ppoppo SDK family (pas-external, pas-plims, pcs-external) — verifier port, audit trait, session liveness port, OIDC discovery, perimeter Bearer-auth Layer kit, identity types. Not a stable public API; do not depend on this crate directly. Consume the SDK crates that re-export from it (e.g. `pas-external`).
Documentation
//! sdk-core's local error type.
//!
//! Distinct from `pas_external::error::Error` — sdk-core does not depend
//! on pas-external. Carrying its own minimal error makes the dependency
//! direction one-way (pas-external → sdk-core, never the reverse).
//!
//! Variants stay narrow: anything sdk-core's primitive types
//! (`Ppnum::TryFrom`, `JwksCache::fetch`) can fail with. SDK-side
//! aggregations (OAuth flows, refresh-token cipher, etc.) live in
//! `pas-external::error::Error` and absorb `SdkCoreError` via
//! `From<SdkCoreError> for Error` at the seam.
//!
//! Phase A scope (audit-revised 2026-05-08): `InvalidPpnum` is the only
//! variant lifted from pas-external during the types::* migration. Future
//! sdk-core surfaces that need typed errors (jwks cache, discovery) reach
//! this enum or carry their own narrow types co-located with the surface.

#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum SdkCoreError {
    /// `Ppnum::try_from(String)` rejected a value that does not match
    /// the `^[0-9]{11,}$` invariant. Carries the offending input for
    /// audit logs; the consumer routes to `400 BAD_REQUEST`.
    #[error("invalid ppnum: {0}")]
    InvalidPpnum(String),
}