Enum Class XstsError

java.lang.Object
java.lang.Enum<XstsError>
lol.trq.alts.auth.XstsError
All Implemented Interfaces:
Serializable, Comparable<XstsError>, Constable

public enum XstsError extends Enum<XstsError>
Why the XSTS step of Microsoft authentication refused, decoded from its XErr code.

The XSTS endpoint answers a refusal with a numeric XErr that says exactly what is wrong, and the library used to read only whether a token came back — so every one of these surfaced as a bare "Xbox auth failed", which tells a user nothing they can act on. Each of these is something the user fixes in a specific place, so classifying it lets a host say where.

Since:
0.11.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    XErr 2148916227, which, as commonly observed, means Xbox Live has banned the account; the reading is not guaranteed.
    XErr 2148916229, which, as commonly observed, means the account is restricted from Xbox Live, typically by family or parental settings that whoever manages them can lift; the reading is not guaranteed.
    The account needs adult verification (South Korea).
    The account needs adult verification (South Korea) — the second code the service uses for it.
    The account is a child under an adult's Microsoft Family, and must be added to a family before it can sign into Xbox Live.
    The Microsoft account has never signed into Xbox, so it has no Xbox profile to authorize.
    The account is from a country where Xbox Live is not available.
    XErr 2148916234, which, as commonly observed, means the account has not accepted the Xbox Live terms of use, which the user does by signing in once at xbox.com; the reading is not guaranteed.
    An XErr this release does not recognise.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the raw XErr code this value maps.
    static XstsError
    fromCode(long xerr)
    Maps an XErr code onto a value.
    static XstsError
    Returns the enum constant of this class with the specified name.
    static XstsError[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NO_XBOX_ACCOUNT

      public static final XstsError NO_XBOX_ACCOUNT
      The Microsoft account has never signed into Xbox, so it has no Xbox profile to authorize. The user signs in once at xbox.com to create one.
      Since:
      0.11.0
    • REGION_BLOCKED

      public static final XstsError REGION_BLOCKED
      The account is from a country where Xbox Live is not available.
      Since:
      0.11.0
    • ADULT_VERIFICATION_REQUIRED

      public static final XstsError ADULT_VERIFICATION_REQUIRED
      The account needs adult verification (South Korea).
      Since:
      0.11.0
    • ADULT_VERIFICATION_REQUIRED_ALT

      public static final XstsError ADULT_VERIFICATION_REQUIRED_ALT
      The account needs adult verification (South Korea) — the second code the service uses for it.
      Since:
      0.11.0
    • CHILD_ACCOUNT

      public static final XstsError CHILD_ACCOUNT
      The account is a child under an adult's Microsoft Family, and must be added to a family before it can sign into Xbox Live.
      Since:
      0.11.0
    • ACCOUNT_BANNED

      public static final XstsError ACCOUNT_BANNED
      XErr 2148916227, which, as commonly observed, means Xbox Live has banned the account; the reading is not guaranteed. If it holds, nothing the library or the host does changes it, and the user takes it up with Xbox.
      Since:
      1.0.0
    • ACCOUNT_RESTRICTED

      public static final XstsError ACCOUNT_RESTRICTED
      XErr 2148916229, which, as commonly observed, means the account is restricted from Xbox Live, typically by family or parental settings that whoever manages them can lift; the reading is not guaranteed.
      Since:
      1.0.0
    • TERMS_NOT_ACCEPTED

      public static final XstsError TERMS_NOT_ACCEPTED
      XErr 2148916234, which, as commonly observed, means the account has not accepted the Xbox Live terms of use, which the user does by signing in once at xbox.com; the reading is not guaranteed.
      Since:
      1.0.0
    • UNKNOWN

      public static final XstsError UNKNOWN
      An XErr this release does not recognise.
      Since:
      0.11.0
  • Method Details

    • values

      public static XstsError[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static XstsError valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public long code()
      Returns the raw XErr code this value maps.
      Returns:
      the code, or 0 for UNKNOWN
      Since:
      0.11.0
    • fromCode

      public static XstsError fromCode(long xerr)
      Maps an XErr code onto a value.
      Parameters:
      xerr - the raw code
      Returns:
      the matching error, UNKNOWN for anything unrecognised
      Since:
      0.11.0