private async Task <AccessToken> RequestTokenRefreshing(AccessToken expiredToken) { var nToken = await AuthorizationManager.RefreshAccessToken(expiredToken); _logger.Log(LogLevel.Information, $"New Token Acquired: {nToken.RefreshToken}"); OnNewToken?.Invoke(nToken); return(nToken); }
public void GetToken() { Thread thread = new Thread(() => { try { string token = Client.GetToken("102851541", HmsMessaging.DefaultTokenScope); OnNewToken?.Invoke(token); } catch (Exception e) { OnTokenError?.Invoke(e); } }); thread.Start(); }
public void HMSOnNewToken(string token, Bundle bundle) { OnNewToken?.Invoke(token); }