Session Manager
The SessionManager class is within the Xerial Unity SDK responsible for managing user sessions. Sessions are essential for maintaining user authentication and authorization states.
The primary purpose of the SessionManager
is to facilitate the establishment and maintenance of user sessions within Unity applications using the Xerial services. It provides functionality to deserialize session response data received from Xerial servers, allowing the storage and retrieval of user session information.
SessionData Class
The SessionData
class represents the session information retrieved from the Xerial services. It encapsulates both the access token and the refresh token necessary for maintaining user sessions within Unity applications.
public class SessionData
{
public SessionToken access;
public SessionToken refresh;
}
Properties
access: An instance of the
SessionToken
class representing the access token associated with the user session.refresh: An instance of the
SessionToken
class representing the refresh token associated with the user session.
Example
csharp// Example instantiation of SessionData object
SessionData sessionData = new SessionData();
// Example assignment of access token
sessionData.access = new SessionToken();
sessionData.access.token = "sampleAccessToken";
// Example assignment of refresh token
sessionData.refresh = new SessionToken();
sessionData.refresh.token = "sampleRefreshToken";
Last updated