Expand description
§pas-external
Ppoppo Accounts System (PAS) client for Rust.
- OAuth2 PKCE authentication flow
- JWT (RFC 9068, EdDSA) token verification via JWKS (RFC 7517)
- OIDC (OpenID Connect 1.0) ID-token verification via
oidc::RelyingParty<S> - Axum middleware for plug-and-play auth routes
§Usage
[dependencies]
pas-external = { version = "0.1", features = ["axum"] }For downstream consumer integration tests, enable test-support to access
MemoryPasAuth (deterministic in-memory PAS substitute, FIFO-scripted):
[dev-dependencies]
pas-external = { version = "0.1", features = ["axum", "test-support"] }Pre-1.0: minor bumps (
0.2,0.3) may include breaking changes per SemVer §11. Versions1.0.1–5.0.0were yanked from crates.io on 2026-04-30 as part of a pre-1.0 version reset;0.1.0is equivalent in scope to the (yanked)5.0.0development line. SeeCHANGELOG.mdfor the design history and0context/STANDARDS_SESSION_LIVENESS.mdfor the consumer-facing contract.
Re-exports§
pub use error::Error;pub use error::TokenError;pub use oidc::Address;pub use oidc::IdAssertion;pub use oidc::IdTokenVerifier;pub use oidc::IdVerifyError;pub use oidc::ScopePiiReader;
Modules§
- audit
- M48 audit trait + types — re-exported from
ppoppo-sdk-core. - clock
- error
- oidc
- γ port-and-adapter SDK boundary for OpenID Connect Relying Party (RP) integration.
- pas_
port - PAS network-boundary port and deep refresh core.
- session_
liveness - Session liveness — two complementary axes.
- types
- SDK identity types — re-exported from
ppoppo-sdk-core.
Structs§
- Audit
Event - Single typed event emitted on every
BearerVerifier::verifyrejection. - KeyId
- PASERK key identifier.
- Memory
Rate Limiter - In-memory token-bucket limiter — Phase 9 default substrate.
- Nonce
- Opaque nonce value. Construction validates non-emptiness; the inner
string is private so callers cannot bypass the invariant by minting
Nonce(String::new())directly. - Noop
Audit Sink - Default sink — explicitly does nothing.
- Ppnum
- Validated Ppoppo Number (≥11 digits, ASCII digits only).
- PpnumId
- PAS ppnum identifier (OAuth
subclaim, ULID format). - Rate
Limit Key - Opaque per-source bucket key for a
RateLimiter. - Rate
Limited Audit Sink - Wraps any
AuditSinkwith anyRateLimiter. - Session
Id - Consumer-defined session identifier (opaque string).
- Url
- A parsed URL record.
- UserId
- Consumer-defined user identifier (opaque string).
- Verified
Claims - Verified bearer-token outcome, opaque to the underlying token format.
- Verify
Config - Per-deployment expectations folded into the verifier at construction.
Enums§
- IdToken
Failure Kind - id_token-specific failure classification (Phase 10.11.B).
- Session
Liveness Error - Per-request liveness failure surface.
- Token
Verify Error - Verify
Error Kind - Failure classification — mirrors the
VerifyErrorandIdVerifyErrorsurfaces but lives at the audit layer.
Traits§
- Audit
Sink - Audit emission port for verify-failure events (M48).
- Bearer
Verifier - Verification port for incoming bearer tokens.
- Rate
Limiter - Per-source rate-limiting port (M49).
- Session
Liveness - Per-request session-row liveness check.
Functions§
- compose_
id_ token_ source_ id - Phase 10.11.D δ2 — id_token compound source key from
azp ‖ aud ‖ kid. - compose_
source_ id - Compose a Phase 9 (e) compound source key from optional hints.