static async Task <TokensResponse> AuthenticationMenu(ITesonetApi api) { TokensResponse token = null; CredentialsPayload credentials = null; AuthenticationManager authManager = new AuthenticationManager(api); while (token == null) { credentials = UserInterface.AskForCredentials(); token = await authManager.GetTokenAsync(credentials); if (token == null) { UserInterface.InformAboutAuthorizationFailure(); if (UserInterface.AskIfExit()) { break; } } } return(token); }
public AuthenticationManager(ITesonetApi api) { this.api = api; }
public ServerManager(ITesonetApi api) { this.api = api; }
public LoginViewModel(ITesonetApi tesonetApi, IEventAggregator eventAggregator) { _tesonetApi = tesonetApi; _eventAggregator = eventAggregator; }