pub struct AuthResponse {
pub session_id: Uuid,
pub session_token: String,
pub expires_at: i64,
}
Expand description
Response structure containing authentication results
Returned after successful signature verification, contains:
- A JWT token for subsequent API requests
- Session identifier for tracking
- Token expiration timestamp
§Example
use ecdsa_jwt::AuthResponse;
let response = AuthResponse {
session_id: uuid::Uuid::new_v4(),
session_token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...".to_string(),
expires_at: 1640995200,
};
Fields§
§session_id: Uuid
Unique session identifier
session_token: String
JWT token for subsequent API requests
expires_at: i64
Unix timestamp when the token expires
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthResponse
impl<'de> Deserialize<'de> for AuthResponse
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 AuthResponse
impl RefUnwindSafe for AuthResponse
impl Send for AuthResponse
impl Sync for AuthResponse
impl Unpin for AuthResponse
impl UnwindSafe for AuthResponse
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