pub struct CredentialsAuthSession { /* private fields */ }Expand description
An authentication session started with a username and password.
Implementations§
Source§impl CredentialsAuthSession
impl CredentialsAuthSession
Sourcepub fn steam_id(&self) -> SteamID
pub fn steam_id(&self) -> SteamID
SteamID of the account logging in. Only set if the credentials were correct.
Sourcepub async fn send_steam_guard_code(
&self,
code: &str,
code_type: EAuthSessionGuardType,
) -> Result<(), SteamError>
pub async fn send_steam_guard_code( &self, code: &str, code_type: EAuthSessionGuardType, ) -> Result<(), SteamError>
Sends a Steam Guard code of the given type for this session.
Sourcepub fn authenticator(&self) -> Option<&Arc<dyn IAuthenticator>>
pub fn authenticator(&self) -> Option<&Arc<dyn IAuthenticator>>
The authenticator used for 2-factor authentication, if any.
Sourcepub fn client_id(&self) -> u64
pub fn client_id(&self) -> u64
Unique id of the requestor. Also used for routing, and part of the QR code.
Sourcepub fn request_id(&self) -> &[u8] ⓘ
pub fn request_id(&self) -> &[u8] ⓘ
Request id to present when polling.
Sourcepub fn polling_interval(&self) -> Duration
pub fn polling_interval(&self) -> Duration
How often to call poll_auth_session_status.
Sourcepub fn allowed_confirmations(&self) -> &[CAuthenticationAllowedConfirmation]
pub fn allowed_confirmations(&self) -> &[CAuthenticationAllowedConfirmation]
The confirmation types that can confirm the request.
Sourcepub async fn polling_wait_for_result(
&self,
cancellation: CancellationToken,
) -> Result<AuthPollResult, SteamError>
pub async fn polling_wait_for_result( &self, cancellation: CancellationToken, ) -> Result<AuthPollResult, SteamError>
Handles any 2-factor authentication and polls until authentication succeeds.
Sourcepub async fn poll_auth_session_status(
&self,
) -> Result<Option<AuthPollResult>, SteamError>
pub async fn poll_auth_session_status( &self, ) -> Result<Option<AuthPollResult>, SteamError>
Polls the authentication status once.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CredentialsAuthSession
impl !RefUnwindSafe for CredentialsAuthSession
impl !UnwindSafe for CredentialsAuthSession
impl Send for CredentialsAuthSession
impl Sync for CredentialsAuthSession
impl Unpin for CredentialsAuthSession
impl UnsafeUnpin for CredentialsAuthSession
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