Table of Contents

Class AuthToken

Namespace
Coherence.Connection
Assembly
Coherence.Auth.dll
public static class AuthToken
Inheritance
AuthToken

Fields

LocalDevelopmentSecret

This secret is used during local development only! There is no security threat with this value leaking anywhere.

public const string LocalDevelopmentSecret = "local-development"

Field Value

string

Methods

Custom(string, ConnectionType, string)

Creates a custom authentication token for a given user that can be used for authentication when connecting to a self-hosted replication server. Secret must match the secret passed to the replication server executable.

public static string Custom(string playUserId, ConnectionType connectionType, string secret)

Parameters

playUserId string
connectionType ConnectionType
secret string

Returns

string

ForLocalDevelopment(ConnectionType)

Creates an authentication token with a random User ID that can be used for authentication when connecting to a local (development) replication server.

public static string ForLocalDevelopment(ConnectionType connectionType)

Parameters

connectionType ConnectionType

Returns

string

Remarks

DO NOT USE IN PRODUCTION - AUTHENTICATION WILL FAIL

ForLocalDevelopment(string, ConnectionType)

Creates an authentication token for a given user that can be used for authentication when connecting to a local (development) replication server.

public static string ForLocalDevelopment(string playUserId, ConnectionType connectionType)

Parameters

playUserId string
connectionType ConnectionType

Returns

string

Remarks

DO NOT USE IN PRODUCTION - AUTHENTICATION WILL FAIL