parent
e485ad1865
commit
171e7dcaf0
2 changed files with 10 additions and 2 deletions
|
|
@ -21,7 +21,8 @@ public class AuthenticationClient(
|
|||
IServerConfigurationRefresher configRefresher,
|
||||
ISettingsProvider settingsProvider,
|
||||
ApiRequestFactory apiRequestFactory,
|
||||
IConnectionClient connectionClient)
|
||||
IConnectionClient connectionClient,
|
||||
ProfileClient profileClient)
|
||||
{
|
||||
public async Task<AuthToken> AuthenticateAsync(string username, string password, Uri serverAddress)
|
||||
{
|
||||
|
|
@ -101,8 +102,10 @@ public class AuthenticationClient(
|
|||
{
|
||||
logger.LogWarning("Could not logout, server inaccessible");
|
||||
}
|
||||
|
||||
|
||||
tokenProvider.SetToken(null);
|
||||
|
||||
profileClient.ClearCache();
|
||||
}
|
||||
|
||||
public async Task RegisterAsync(string username, string password, string passwordConfirmation)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ namespace LANCommander.SDK.Services
|
|||
return _user;
|
||||
}
|
||||
|
||||
public void ClearCache()
|
||||
{
|
||||
_user = null;
|
||||
}
|
||||
|
||||
public async Task<string> GetAliasAsync()
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue