1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! OAuth 2.1 adapters: driven, because each one reaches an authorization server
//! that lives somewhere else.
//!
//! One per mechanism for establishing *authenticity*. Which revision requires
//! any of it, and what a verified token is then allowed to do, are both in
//! `application/oauth/`.
//!
//! The two are interchangeable behind
//! [`TokenSource`](crate::application::oauth::TokenSource), and a deployment
//! picks between them on cost rather than on trust: [`introspection`] asks the
//! authorization server about every
//! request and is right the instant a token is revoked, while [`jwt`] checks
//! the signature locally and is right only until the token expires or its key
//! is withdrawn.
// T16. Bounded response reads and transport-failure descriptions, shared by
// the two adapters that call an authorization server. Public because a
// downstream adapter writing its own token or userinfo call wants the same
// bounded read rather than its own copy of the cap.
// T16. The client half's secret source. Gated on `random-ids` as well as on
// `oauth`, because it needs both the port (which only exists when `oauth` is on)
// and an entropy source. A consumer that wants its own — a hardware token, a KMS
// — links `oauth` without `random-ids` and implements the port itself, which is
// the whole reason the port exists.
// T16. RFC 7591 dynamic registration and Client ID Metadata Document fetch.
// `oauth` already gates this module, so no second gate here.
pub use LoopbackBrowser;