#[non_exhaustive]pub enum JwtAlgorithm {
Hs256Internal,
Rs256,
Es256,
EdDsa,
}Expand description
Public JWT algorithm policy for rskit.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Hs256Internal
HMAC-SHA256 for explicitly internal symmetric deployments only.
Rs256
RSA-SHA256 — preferred public-key default.
Es256
ECDSA P-256 / SHA-256.
EdDsa
Ed25519 / EdDSA.
Implementations§
Source§impl JwtAlgorithm
impl JwtAlgorithm
Sourcepub const fn as_jsonwebtoken(self) -> Algorithm
pub const fn as_jsonwebtoken(self) -> Algorithm
Return the jsonwebtoken algorithm for this policy entry.
Sourcepub const fn is_symmetric(self) -> bool
pub const fn is_symmetric(self) -> bool
True when the algorithm uses a symmetric shared secret.
Trait Implementations§
Source§impl Clone for JwtAlgorithm
impl Clone for JwtAlgorithm
Source§fn clone(&self) -> JwtAlgorithm
fn clone(&self) -> JwtAlgorithm
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JwtAlgorithm
Source§impl Debug for JwtAlgorithm
impl Debug for JwtAlgorithm
Source§impl<'de> Deserialize<'de> for JwtAlgorithm
impl<'de> Deserialize<'de> for JwtAlgorithm
Source§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
impl Eq for JwtAlgorithm
Source§impl PartialEq for JwtAlgorithm
impl PartialEq for JwtAlgorithm
Source§fn eq(&self, other: &JwtAlgorithm) -> bool
fn eq(&self, other: &JwtAlgorithm) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JwtAlgorithm
Auto Trait Implementations§
impl Freeze for JwtAlgorithm
impl RefUnwindSafe for JwtAlgorithm
impl Send for JwtAlgorithm
impl Sync for JwtAlgorithm
impl Unpin for JwtAlgorithm
impl UnsafeUnpin for JwtAlgorithm
impl UnwindSafe for JwtAlgorithm
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.