Search Results for

    Show / Hide Table of Contents

    Class AuthKit

    AuthKit is the base for authentication with Pley, allowing you to get a game user ID that is unique per game however linked to the users Pley account. This also allows you to get session token, a specific token generated for the session.

    Inheritance
    System.Object
    AuthKit
    Namespace: Pley
    Assembly: Pley.dll
    Syntax
    public static class AuthKit : object

    Methods

    GetGameUserID()

    Returns the user ID generated for the specific user for this specific game.

    Declaration
    public static string GetGameUserID()
    Returns
    Type Description
    System.String

    Returns the UUID, null if failed to get GameUserID

    GetGameUserID(out String)

    Returns the user ID generated for the specific user for this specific game.

    Declaration
    public static PleyResult GetGameUserID(out string gameUserID)
    Parameters
    Type Name Description
    System.String gameUserID
    Returns
    Type Description
    PleyResult

    Returns result whether succeeded or not to retrieve game user ID.

    GetSessionToken()

    Get the current user's session token. The session token is a unique token generated for each session (i.e. every time a user loads a game) which is used by Pley to validate that the user has access to such game.

    Declaration
    public static string GetSessionToken()
    Returns
    Type Description
    System.String

    Returns the session token from Pley.

    GetSessionToken(out String)

    Get the current user's session token. The session token is a unique token generated for each session (i.e. every time a user loads a game) which is used by Pley to validate that the user has access to such game.

    Declaration
    public static PleyResult GetSessionToken(out string token)
    Parameters
    Type Name Description
    System.String token

    Returns the session token for this session.

    Returns
    Type Description
    PleyResult

    Returns whether succeeded or not to retrieve the session token.

    GetUsername()

    Get the current user's Pley username.

    Declaration
    public static string GetUsername()
    Returns
    Type Description
    System.String

    Returns the username from Pley.

    GetUsername(out String)

    Get the current user's Pley username.

    Declaration
    public static PleyResult GetUsername(out string username)
    Parameters
    Type Name Description
    System.String username

    Returns the user's Pley username.

    Returns
    Type Description
    PleyResult

    Returns whether succeeds or not to retrieve the username.

    IsUserLoggedIn()

    Is the user is logged in to a claimed account or not.

    Declaration
    public static bool IsUserLoggedIn()
    Returns
    Type Description
    System.Boolean

    Returns true if the user is logged in.

    IsUserLoggedIn(out Boolean)

    Is the user is logged in to a claimed account or not.

    Declaration
    public static PleyResult IsUserLoggedIn(out bool isLoggedIn)
    Parameters
    Type Name Description
    System.Boolean isLoggedIn

    Returns true if the user is logged in.

    Returns
    Type Description
    PleyResult

    Returns whether succeeded or not to check if user is logged in.

    RequestSignUpAsync(Boolean)

    Request the user to sign up to Pley

    Declaration
    public static async Task<PleyResult> RequestSignUpAsync(bool forceSignUp = false)
    Parameters
    Type Name Description
    System.Boolean forceSignUp

    Should the sign-up/login be forced.

    Returns
    Type Description
    Task<PleyResult>

    Returns result whether succeeds or not, possible error are the following: AukAlreadyLoggedIn, AukUserDidNotSignUp

    Events

    OnUserSignUp

    Callback for when a guest user has signed up.

    Declaration
    public static event AuthKit.UserSignUpCallback OnUserSignUp
    Event Type
    Type Description
    AuthKit.UserSignUpCallback
    In This Article
    Back to top Generated by DocFX