Enum openidconnect::core::CoreJwsSigningAlgorithm [−][src]
#[non_exhaustive] pub enum CoreJwsSigningAlgorithm {}Show variants
HmacSha256, HmacSha384, HmacSha512, RsaSsaPkcs1V15Sha256, RsaSsaPkcs1V15Sha384, RsaSsaPkcs1V15Sha512, EcdsaP256Sha256, EcdsaP384Sha384, EcdsaP521Sha512, RsaSsaPssSha256, RsaSsaPssSha384, RsaSsaPssSha512, None,
Expand description
OpenID Connect Core JWS signing algorithms.
These algorithms represent the alg
header parameter values for JSON Web Signature.
They are used to digitally sign or create a MAC of the contents of the JWS Protected Header and
the JWS Payload. The values are described in
Section 3.1 of RFC 7518.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
HMAC using SHA-256 (currently unsupported).
HMAC using SHA-384 (currently unsupported).
HMAC using SHA-512 (currently unsupported).
RSA SSA PKCS#1 v1.5 using SHA-256.
RSA SSA PKCS#1 v1.5 using SHA-384.
RSA SSA PKCS#1 v1.5 using SHA-512.
ECDSA using P-256 and SHA-256 (currently unsupported).
ECDSA using P-384 and SHA-384 (currently unsupported).
ECDSA using P-521 and SHA-512 (currently unsupported).
RSA SSA-PSS using SHA-256 and MGF1 with SHA-256.
RSA SSA-PSS using SHA-384 and MGF1 with SHA-384.
RSA SSA-PSS using SHA-512 and MGF1 with SHA-512.
No digital signature or MAC performed.
Security Warning
This algorithm provides no security over the integrity of the JSON Web Token. Clients should be careful not to rely on unsigned JWT’s for security purposes. See Critical vulnerabilities in JSON Web Token libraries for further discussion.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Returns the key ID, or None
if no key ID is specified. Read more
Returns the key type (e.g., RSA). Read more
Returns the allowed key usage (e.g., signing or encryption), or None
if no usage is
specified. Read more
Initializes a new symmetric key or shared signing secret from the specified raw bytes. Read more
fn verify_signature(
&self,
signature_alg: &CoreJwsSigningAlgorithm,
message: &[u8],
signature: &[u8]
) -> Result<(), SignatureVerificationError>
fn verify_signature(
&self,
signature_alg: &CoreJwsSigningAlgorithm,
message: &[u8],
signature: &[u8]
) -> Result<(), SignatureVerificationError>
Verifies the given signature
using the given signature algorithm (signature_alg
) over
the given message
. Read more
Returns the type of key required to use this signature algorithm, or None
if this
algorithm does not require a key. Read more
Returns true if the signature algorithm uses a shared secret (symmetric key). Read more
Hashes the given bytes
using the hash algorithm associated with this signing
algorithm, and returns the hashed bytes. Read more
Returns the RS256 algorithm. Read more
Auto Trait Implementations
impl RefUnwindSafe for CoreJwsSigningAlgorithm
impl Send for CoreJwsSigningAlgorithm
impl Sync for CoreJwsSigningAlgorithm
impl Unpin for CoreJwsSigningAlgorithm
impl UnwindSafe for CoreJwsSigningAlgorithm
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V