#[non_exhaustive]pub enum TokenType {
Bearer,
Dpop,
}Expand description
token_type values this server issues: Bearer (RFC 6750), and DPoP (RFC 9449 section 5)
under the dpop feature when the request proved possession of a key. Both registered values
are case-insensitive on the wire but conventionally spelled as the renames below pin them.
#[non_exhaustive]: the Dpop variant exists only under the dpop feature, so a host that
matches this exhaustively compiles today and stops compiling the day anything in its dependency
graph turns dpop on. Naming either variant still works; only the match needs a wildcard arm.
A token_type is exactly the thing a host branches on when deciding how to hand the response
to its client, so this is the enum most likely to be matched and the least affordable to leave
open.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bearer
RFC 6750 bearer token.
Dpop
dpop only.RFC 9449 section 5 sender-constrained token, bound to the key the client proved possession
of. The spelling is DPoP, exactly, because RFC 9449 section 7.1 makes it the HTTP
authentication scheme name the client will present the token under.