pub struct AuthRequest {
pub challenge: String,
pub signature: String,
pub public_key: String,
}
Expand description
Request structure for authenticating with a signed challenge
This contains all the data needed to verify a client’s identity:
- The original challenge that was provided to the client
- The client’s signature of that challenge (proves private key ownership)
- The client’s public key (used to verify the signature)
§Example
use ecdsa_jwt::AuthRequest;
let auth_request = AuthRequest {
challenge: "base64-encoded-challenge".to_string(),
signature: "base64-encoded-signature".to_string(),
public_key: "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----".to_string(),
};
Fields§
§challenge: String
Base64-encoded challenge that was signed by the client
signature: String
Base64-encoded ECDSA signature of the challenge
public_key: String
PEM-encoded public key used to verify the signature
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthRequest
impl<'de> Deserialize<'de> for AuthRequest
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
Auto Trait Implementations§
impl Freeze for AuthRequest
impl RefUnwindSafe for AuthRequest
impl Send for AuthRequest
impl Sync for AuthRequest
impl Unpin for AuthRequest
impl UnwindSafe for AuthRequest
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