logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SteamQrChallenge

    The QR challenge a phone scans to approve a sign-in, with the ids every later poll must echo.

    Inheritance
    object
    SteamQrChallenge
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Steam.Application.SignIn
    Assembly: Serenity.Steam.Application.dll
    Syntax
    public sealed class SteamQrChallenge
    Remarks

    Immutable: Steam rotates the challenge every few seconds, and WithRotation(ulong, string) returns the rotated copy instead of changing this one. ToString() is deliberately redacted — the URL and the ids authorise the session, so a log line or an exception message must never carry them.

    Constructors

    SteamQrChallenge(ulong, string, byte[], float)

    Creates a challenge from what Steam answered when the session started.

    Declaration
    public SteamQrChallenge(ulong clientId, string challengeUrl, byte[] requestId, float pollIntervalSeconds)
    Parameters
    Type Name Description
    ulong clientId

    The session's client id.

    string challengeUrl

    The URL the QR code encodes.

    byte[] requestId

    The opaque request id that stays the same for the whole session. Copied.

    float pollIntervalSeconds

    How often Steam asks the client to poll; 0, negative or not a number means DefaultPollInterval, anything else is clamped to the allowed range.

    Fields

    DefaultPollInterval

    The pause between two polls when Steam sends no usable interval.

    Declaration
    public static readonly TimeSpan DefaultPollInterval
    Field Value
    Type Description
    TimeSpan

    MaximumPollInterval

    The longest pause between two polls, whatever Steam asks for: the session expires when left unpolled.

    Declaration
    public static readonly TimeSpan MaximumPollInterval
    Field Value
    Type Description
    TimeSpan

    MinimumPollInterval

    The shortest pause between two polls, whatever Steam asks for.

    Declaration
    public static readonly TimeSpan MinimumPollInterval
    Field Value
    Type Description
    TimeSpan

    Properties

    ChallengeUrl

    Declaration
    public string ChallengeUrl { get; }
    Property Value
    Type Description
    string

    The URL the QR code encodes.

    ClientId

    Declaration
    public ulong ClientId { get; }
    Property Value
    Type Description
    ulong

    The session's current client id; it changes whenever Steam rotates the challenge.

    PollInterval

    Declaration
    public TimeSpan PollInterval { get; }
    Property Value
    Type Description
    TimeSpan

    How long to wait between two polls.

    RequestId

    Declaration
    public byte[] RequestId { get; }
    Property Value
    Type Description
    byte[]

    A copy of the request id that stays the same for the whole session.

    Methods

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    WithRotation(ulong, string)

    The same session after Steam rotated the challenge: new client id and URL, same request id and interval.

    Declaration
    public SteamQrChallenge WithRotation(ulong newClientId, string newChallengeUrl)
    Parameters
    Type Name Description
    ulong newClientId
    string newChallengeUrl
    Returns
    Type Description
    SteamQrChallenge
    In this article
    © 2026 Serenity. All Rights Reserved