pub struct AuthSession { /* private fields */ }Expand description
An authentication session, used to finish authenticating and get the tokens.
Implementations§
Source§impl AuthSession
impl AuthSession
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. You probably want
AuthSession::polling_wait_for_result instead.
Returns the tokens for logging on, or None if the session isn’t
authenticated yet.
Sourcepub fn handle_poll_auth_session_status_response(
&self,
response: &CAuthenticationPollAuthSessionStatusResponse,
)
pub fn handle_poll_auth_session_status_response( &self, response: &CAuthenticationPollAuthSessionStatusResponse, )
Handles a poll response. QR sessions also pick up a refreshed challenge
URL here (see SessionKind::Qr).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AuthSession
impl !RefUnwindSafe for AuthSession
impl !UnwindSafe for AuthSession
impl Send for AuthSession
impl Sync for AuthSession
impl Unpin for AuthSession
impl UnsafeUnpin for AuthSession
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