21 lines
712 B
C#
21 lines
712 B
C#
|
|
namespace RudderSdk.Core.Abstractions;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Persists the session token pair. The default is <see cref="InMemoryTokenStore"/>;
|
||
|
|
/// games should provide a durable implementation (player prefs, keychain, ...).
|
||
|
|
/// </summary>
|
||
|
|
public interface ITokenStore
|
||
|
|
{
|
||
|
|
/// <summary>Returns the current access token, or null when signed out.</summary>
|
||
|
|
string? GetAccessToken();
|
||
|
|
|
||
|
|
/// <summary>Returns the current refresh token, or null when signed out.</summary>
|
||
|
|
string? GetRefreshToken();
|
||
|
|
|
||
|
|
/// <summary>Stores a fresh token pair.</summary>
|
||
|
|
void SaveTokens(string accessToken, string refreshToken);
|
||
|
|
|
||
|
|
/// <summary>Drops both tokens (logout / session expiry).</summary>
|
||
|
|
void Clear();
|
||
|
|
}
|