Table of Contents

LegacyLoginData

struct in Coherence.Cloud

Represents locally cached data for the last user that was logged in using the old login system.

In coherence version 1.3.0 and older, coherence used to store the username, guest password, and session token for you, and automatically try to log you in again using them.

In the current version, you need to store this data yourself, and pass it to the appropriate login methods in AuthClient, to log in again as the same user, without needing to provide the username and password. Storing the data locally can be done easily using SetString(string, string).

Remarks

This data can be acquired using Get(string, string), if it exists. If it doesn't exist, then None is returned.

You can pass SessionToken to LoginWithToken(SessionToken) to try to log in again as the same user without needing to provide the username and password. This will only work if the session token has not expired.

You can also pass Username and GuestPassword to LoginWithPassword(string, string, bool), if both are available, to log in again as the same guest user. If the last user that logged in using the old system used a username and password, then GuestPassword will be an empty string.

You can clear all the cached legacy login data for the currenet project using Clear(string, string) once you no longer need it.

Fields
None

Result returned by Get(string, string) when no cached data is found for the project.

Properties
GuestPassword

Password that was automatically generated for the last user that was logged in as a guest using the old login system.

SessionToken

Token uniquely identifying the last user that was logged in using the old login system.

Username

Username that was last used to log in using the old login system.

Methods
Clear

Clear all locally cached data from the last user that was logged in to the given project using the old login system in coherence 1.3.0 and older.

Cached data includes the Username, GuestPassword (if the last user was logged in as a guest), and SessionToken for the user-

ClearForProject

Clear all locally cached data for all guest accounts in a given Project that used the the old login system in coherence 1.3.0 and older.

Cached data includes the Username, GuestPassword (if the last user was logged in as a guest), and SessionToken for the user.

ID of the project. Can be retrieved via RuntimeSettings.Instance.ProjectID.
Get

Get locally cached data from the last user that was logged in to the given project using the old login system in coherence 1.3.0 and older.

See Also