pub struct AuthenticationClient { /* private fields */ }Expand description
Authentication client for communicating with Steam’s auth service.
Implementations§
Source§impl AuthenticationClient
impl AuthenticationClient
Sourcepub fn new(
transport: Transport,
platform_type: EAuthTokenPlatformType,
machine_id: Option<Vec<u8>>,
client_friendly_name: Option<String>,
) -> Self
pub fn new( transport: Transport, platform_type: EAuthTokenPlatformType, machine_id: Option<Vec<u8>>, client_friendly_name: Option<String>, ) -> Self
Create a new authentication client.
Sourcepub async fn get_rsa_key(
&self,
account_name: &str,
) -> Result<RsaKeyResponse, SessionError>
pub async fn get_rsa_key( &self, account_name: &str, ) -> Result<RsaKeyResponse, SessionError>
Get RSA public key for password encryption.
Sourcepub async fn encrypt_password(
&self,
account_name: &str,
password: &str,
) -> Result<EncryptedPassword, SessionError>
pub async fn encrypt_password( &self, account_name: &str, password: &str, ) -> Result<EncryptedPassword, SessionError>
Encrypt a password using RSA.
This method fetches Steam’s RSA public key and uses it to encrypt the
password. The actual encryption is performed by the pure function
rsa_encrypt_password.
Sourcepub async fn start_session_with_credentials(
&self,
account_name: &str,
encrypted_password: &str,
key_timestamp: u64,
persistence: ESessionPersistence,
steam_guard_machine_token: Option<&str>,
) -> Result<StartAuthSessionResponse, SessionError>
pub async fn start_session_with_credentials( &self, account_name: &str, encrypted_password: &str, key_timestamp: u64, persistence: ESessionPersistence, steam_guard_machine_token: Option<&str>, ) -> Result<StartAuthSessionResponse, SessionError>
Start an auth session with credentials.
Sourcepub async fn start_session_with_qr(
&self,
) -> Result<StartAuthSessionResponse, SessionError>
pub async fn start_session_with_qr( &self, ) -> Result<StartAuthSessionResponse, SessionError>
Start a QR code auth session.
Sourcepub async fn submit_steam_guard_code(
&self,
client_id: u64,
steam_id: u64,
code: &str,
code_type: EAuthSessionGuardType,
) -> Result<(), SessionError>
pub async fn submit_steam_guard_code( &self, client_id: u64, steam_id: u64, code: &str, code_type: EAuthSessionGuardType, ) -> Result<(), SessionError>
Submit a Steam Guard code.
Sourcepub async fn poll_login_status(
&self,
client_id: u64,
request_id: &[u8],
) -> Result<PollLoginStatusResponse, SessionError>
pub async fn poll_login_status( &self, client_id: u64, request_id: &[u8], ) -> Result<PollLoginStatusResponse, SessionError>
Poll the auth session status.
Sourcepub async fn generate_access_token(
&self,
refresh_token: &str,
steam_id: u64,
renew: bool,
) -> Result<(String, Option<String>), SessionError>
pub async fn generate_access_token( &self, refresh_token: &str, steam_id: u64, renew: bool, ) -> Result<(String, Option<String>), SessionError>
Generate an access token from a refresh token.
Sourcepub async fn get_auth_session_info(
&self,
access_token: &str,
client_id: u64,
) -> Result<CAuthenticationGetAuthSessionInfoResponse, SessionError>
pub async fn get_auth_session_info( &self, access_token: &str, client_id: u64, ) -> Result<CAuthenticationGetAuthSessionInfoResponse, SessionError>
Get information about an auth session (for QR approval).
Sourcepub async fn submit_mobile_confirmation(
&self,
access_token: &str,
version: i32,
client_id: u64,
steam_id: u64,
signature: &[u8],
confirm: bool,
persistence: ESessionPersistence,
) -> Result<(), SessionError>
pub async fn submit_mobile_confirmation( &self, access_token: &str, version: i32, client_id: u64, steam_id: u64, signature: &[u8], confirm: bool, persistence: ESessionPersistence, ) -> Result<(), SessionError>
Submit mobile confirmation to approve/deny a login.
Auto Trait Implementations§
impl Freeze for AuthenticationClient
impl !RefUnwindSafe for AuthenticationClient
impl Send for AuthenticationClient
impl Sync for AuthenticationClient
impl Unpin for AuthenticationClient
impl UnsafeUnpin for AuthenticationClient
impl !UnwindSafe for AuthenticationClient
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