AuthSession

open class AuthSession(val authentication: SteamAuthentication, val authenticator: IAuthenticator?, var clientID: Long, val requestID: ByteArray, var allowedConfirmations: List<SteammessagesAuthSteamclient.CAuthentication_AllowedConfirmation>, val pollingInterval: Float, val defaultScope: CoroutineScope)

Represents an authentication session which can be used to finish the authentication and get access tokens.

Parameters

authentication

Unified messages class for Authentication related messages, see Authentication.

authenticator

Authenticator object which will be used to handle 2-factor authentication if necessary.

clientID

Unique identifier of requestor, also used for routing, portion of QR code.

requestID

Unique request ID to be presented by requestor at poll time.

allowedConfirmations

Confirmation types that will be able to confirm the request.

pollingInterval

Refresh interval with which requestor should call PollAuthSessionStatus.

defaultScope

Default coroutine scope used for authentication operations and polling.

Inheritors

Constructors

Link copied to clipboard
constructor(authentication: SteamAuthentication, authenticator: IAuthenticator?, clientID: Long, requestID: ByteArray, allowedConfirmations: List<SteammessagesAuthSteamclient.CAuthentication_AllowedConfirmation>, pollingInterval: Float, defaultScope: CoroutineScope)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var allowedConfirmations: List<SteammessagesAuthSteamclient.CAuthentication_AllowedConfirmation>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val defaultScope: CoroutineScope
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun pollAuthSessionStatus(parentScope: CoroutineScope = defaultScope): CompletableFuture<AuthPollResult?>

Polls for authentication status once. Prefer using pollingWaitForResult instead.

Link copied to clipboard
fun pollingWaitForResult(parentScope: CoroutineScope = defaultScope): CompletableFuture<AuthPollResult>

Handle any 2-factor authentication, and if necessary poll for updates until authentication succeeds.