pub struct FrontendTokenAutoProvisionRequest {
pub publishable_key: String,
pub customer_id: String,
pub email: String,
pub device_id: Option<String>,
pub ttl_seconds: Option<i64>,
}Expand description
Request payload for POST /auth/frontend-token with auto-provisioning.
Use this when the customer may not exist and should be created on the free tier. The email is required for auto-provisioning.
Create via FrontendTokenAutoProvisionRequest::new or
FrontendTokenRequest::with_auto_provision.
Fields§
§publishable_key: StringPublishable key (mr_pk_*) - required for authentication.
customer_id: StringCustomer identifier - required to issue a token for this customer.
email: StringEmail address - required for auto-provisioning a new customer.
device_id: Option<String>Optional device identifier for tracking/rate limiting.
ttl_seconds: Option<i64>Optional TTL in seconds for the issued token.
Implementations§
Source§impl FrontendTokenAutoProvisionRequest
impl FrontendTokenAutoProvisionRequest
Sourcepub fn new(
publishable_key: impl Into<String>,
customer_id: impl Into<String>,
email: impl Into<String>,
) -> Self
pub fn new( publishable_key: impl Into<String>, customer_id: impl Into<String>, email: impl Into<String>, ) -> Self
Create a new auto-provisioning frontend token request with required fields.
Sourcepub fn with_device_id(self, device_id: impl Into<String>) -> Self
pub fn with_device_id(self, device_id: impl Into<String>) -> Self
Set the device ID for tracking/rate limiting.
Sourcepub fn with_ttl_seconds(self, ttl: i64) -> Self
pub fn with_ttl_seconds(self, ttl: i64) -> Self
Set the TTL in seconds for the issued token.
Trait Implementations§
Source§impl Clone for FrontendTokenAutoProvisionRequest
impl Clone for FrontendTokenAutoProvisionRequest
Source§fn clone(&self) -> FrontendTokenAutoProvisionRequest
fn clone(&self) -> FrontendTokenAutoProvisionRequest
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<'de> Deserialize<'de> for FrontendTokenAutoProvisionRequest
impl<'de> Deserialize<'de> for FrontendTokenAutoProvisionRequest
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
Source§impl PartialEq for FrontendTokenAutoProvisionRequest
impl PartialEq for FrontendTokenAutoProvisionRequest
Source§fn eq(&self, other: &FrontendTokenAutoProvisionRequest) -> bool
fn eq(&self, other: &FrontendTokenAutoProvisionRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FrontendTokenAutoProvisionRequest
Auto Trait Implementations§
impl Freeze for FrontendTokenAutoProvisionRequest
impl RefUnwindSafe for FrontendTokenAutoProvisionRequest
impl Send for FrontendTokenAutoProvisionRequest
impl Sync for FrontendTokenAutoProvisionRequest
impl Unpin for FrontendTokenAutoProvisionRequest
impl UnwindSafe for FrontendTokenAutoProvisionRequest
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