pub(crate) struct LoginApiRequest<T: Serialize + DeserializeOwned + Debug> {
pub client_id: String,
pub grant_type: GrantType,
pub scope: String,
pub device_type: DeviceType,
pub device_identifier: String,
pub device_name: String,
pub device_push_token: Option<String>,
pub two_factor_token: Option<String>,
pub two_factor_provider: Option<TwoFactorProvider>,
pub two_factor_remember: Option<bool>,
pub login_mechanism_fields: T,
}Expand description
The common payload properties to send to the /connect/token endpoint to obtain tokens for a BW user.
Fields§
§client_id: StringThe client ID for the SDK consuming client. Note: snake_case is intentional to match the API expectations.
grant_type: GrantTypeThe grant type for the token request. Note: snake_case is intentional to match the API expectations.
scope: StringThe space-separated scopes for the token request (e.g., “api offline_access”).
device_type: DeviceTypeThe device type making the request.
device_identifier: StringThe identifier of the device.
device_name: StringThe name of the device.
device_push_token: Option<String>The push notification registration token for mobile devices.
two_factor_token: Option<String>The two-factor authentication token.
two_factor_provider: Option<TwoFactorProvider>The two-factor authentication provider.
two_factor_remember: Option<bool>Whether to remember two-factor authentication on this device.
login_mechanism_fields: TImplementations§
Source§impl<T: Serialize + DeserializeOwned + Debug> LoginApiRequest<T>
impl<T: Serialize + DeserializeOwned + Debug> LoginApiRequest<T>
Sourcepub(crate) fn new(
client_id: String,
grant_type: GrantType,
device_type: DeviceType,
device_identifier: String,
device_name: String,
device_push_token: Option<String>,
login_mechanism_fields: T,
) -> Self
pub(crate) fn new( client_id: String, grant_type: GrantType, device_type: DeviceType, device_identifier: String, device_name: String, device_push_token: Option<String>, login_mechanism_fields: T, ) -> Self
Creates a new UserLoginApiRequest with standard scopes (“api offline_access”). The scope can be overridden after construction if needed for specific auth flows.
Trait Implementations§
Source§impl<T: Debug + Serialize + DeserializeOwned + Debug> Debug for LoginApiRequest<T>
impl<T: Debug + Serialize + DeserializeOwned + Debug> Debug for LoginApiRequest<T>
Source§impl<'de, T> Deserialize<'de> for LoginApiRequest<T>
impl<'de, T> Deserialize<'de> for LoginApiRequest<T>
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>,
Source§impl From<(PasswordLoginRequest, MasterPasswordAuthenticationData)> for LoginApiRequest<PasswordLoginApiRequest>
Converts a PasswordLoginRequest and MasterPasswordAuthenticationData into a
PasswordLoginApiRequest for making the API call.
impl From<(PasswordLoginRequest, MasterPasswordAuthenticationData)> for LoginApiRequest<PasswordLoginApiRequest>
Converts a PasswordLoginRequest and MasterPasswordAuthenticationData into a
PasswordLoginApiRequest for making the API call.
Source§fn from(
(request, master_password_authentication): (PasswordLoginRequest, MasterPasswordAuthenticationData),
) -> Self
fn from( (request, master_password_authentication): (PasswordLoginRequest, MasterPasswordAuthenticationData), ) -> Self
Source§impl<T> Serialize for LoginApiRequest<T>
impl<T> Serialize for LoginApiRequest<T>
Auto Trait Implementations§
impl<T> Freeze for LoginApiRequest<T>where
T: Freeze,
impl<T> RefUnwindSafe for LoginApiRequest<T>where
T: RefUnwindSafe,
impl<T> Send for LoginApiRequest<T>where
T: Send,
impl<T> Sync for LoginApiRequest<T>where
T: Sync,
impl<T> Unpin for LoginApiRequest<T>where
T: Unpin,
impl<T> UnwindSafe for LoginApiRequest<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more