pub enum DpopAlgorithm {
Es256,
Rs256,
}Expand description
A DPoP proof signing algorithm.
DPoP requires an asymmetric algorithm (RFC 9449 §4.2); a symmetric one
such as HS256 would let anyone holding the shared secret mint proofs, which
defeats the whole point of sender-constraining a token. These are the two
RFC 9449 §4.1 expects every implementation to provide.
Variants§
Es256
ECDSA using P-256 and SHA-256 (RFC 7518 §3.4). Keys are EC P-256.
Rs256
RSASSA-PKCS1-v1_5 using SHA-256 (RFC 7518 §3.3). Keys are RSA of at least 2048 bits.
Implementations§
Trait Implementations§
Source§impl Clone for DpopAlgorithm
impl Clone for DpopAlgorithm
impl Copy for DpopAlgorithm
Source§impl Debug for DpopAlgorithm
impl Debug for DpopAlgorithm
Source§impl Display for DpopAlgorithm
impl Display for DpopAlgorithm
impl Eq for DpopAlgorithm
Source§impl FromStr for DpopAlgorithm
impl FromStr for DpopAlgorithm
Source§fn from_str(s: &str) -> Result<Self>
fn from_str(s: &str) -> Result<Self>
Parses a JWA algorithm name into a DPoP algorithm (DPOP-007).
§Errors
IdentityError::Configuration for anything other than ES256 or
RS256 — including the symmetric algorithms and none, which
RFC 9449 §4.2 forbids for proofs.
Source§type Err = IdentityError
type Err = IdentityError
The associated error which can be returned from parsing.
Source§impl Hash for DpopAlgorithm
impl Hash for DpopAlgorithm
Source§impl PartialEq for DpopAlgorithm
impl PartialEq for DpopAlgorithm
impl StructuralPartialEq for DpopAlgorithm
Auto Trait Implementations§
impl Forget for DpopAlgorithm
impl Freeze for DpopAlgorithm
impl Move for DpopAlgorithm
impl RefUnwindSafe for DpopAlgorithm
impl Send for DpopAlgorithm
impl Sync for DpopAlgorithm
impl Unpin for DpopAlgorithm
impl UnsafeUnpin for DpopAlgorithm
impl UnwindSafe for DpopAlgorithm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more