pub struct ActivationRequest {
pub license_id: Uuid,
pub hardware_fingerprint: String,
pub machine_name: String,
pub ip_address: Option<String>,
pub user_agent: Option<String>,
pub timestamp: DateTime<Utc>,
pub nonce: String,
}Expand description
Request to activate a license on a specific device.
This struct is sent from the client application to the license server to request activation of a license. It includes hardware fingerprinting and device metadata for license binding and tracking purposes.
§Fields
license_id: Unique identifier of the license to activatehardware_fingerprint: SHA-256 hash of hardware identifiers for device bindingmachine_name: Human-readable name of the device/machineip_address: Optional client IP address for geolocation and securityuser_agent: Optional client software/version for compatibility trackingtimestamp: When the activation request was created (UTC)nonce: Unique one-time value to prevent replay attacks
§Security Considerations
- The
hardware_fingerprintshould be generated client-side to avoid transmitting raw hardware data nonceprevents replay attacks by ensuring each request is unique- Timestamp allows detection of delayed or manipulated requests
§Example JSON
{
"license_id": "123e4567-e89b-12d3-a456-426614174000",
"hardware_fingerprint": "a1b2c3d4e5f67890...",
"machine_name": "Johns-MacBook-Pro",
"ip_address": "192.168.1.100",
"user_agent": "MyApp/2.0.0 (macOS 14.0)",
"timestamp": "2024-01-01T12:00:00Z",
"nonce": "550e8400-e29b-41d4-a716-446655440000"
}Fields§
§license_id: Uuid§hardware_fingerprint: String§machine_name: String§ip_address: Option<String>§user_agent: Option<String>§timestamp: DateTime<Utc>§nonce: StringTrait Implementations§
Source§impl Clone for ActivationRequest
impl Clone for ActivationRequest
Source§fn clone(&self) -> ActivationRequest
fn clone(&self) -> ActivationRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActivationRequest
impl Debug for ActivationRequest
Source§impl<'de> Deserialize<'de> for ActivationRequest
impl<'de> Deserialize<'de> for ActivationRequest
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 ActivationRequest
impl RefUnwindSafe for ActivationRequest
impl Send for ActivationRequest
impl Sync for ActivationRequest
impl Unpin for ActivationRequest
impl UnwindSafe for ActivationRequest
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