pub struct SignatureValidator { /* private fields */ }Expand description
Main signature validator implementation. It receives the specifications of the signature check:
- Algorithm
- Key Length
- Verifying Key (RSA, ES) or Signing Secret (HMAC)
And it generates the corresponding specific validator for the use case.
Implementations§
Source§impl SignatureValidator
impl SignatureValidator
Sourcepub fn new(
algorithm: SigningAlgorithm,
key_length: SigningKeyLength,
key: String,
) -> Result<Self, JWTError>
pub fn new( algorithm: SigningAlgorithm, key_length: SigningKeyLength, key: String, ) -> Result<Self, JWTError>
Create a new SignatureValidator from the given algorithm, key length and key.
Auto Trait Implementations§
impl Freeze for SignatureValidator
impl !RefUnwindSafe for SignatureValidator
impl !Send for SignatureValidator
impl !Sync for SignatureValidator
impl Unpin for SignatureValidator
impl !UnwindSafe for SignatureValidator
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