private async Task <OAuthAccessToken> GetTokenFromService() { _logger.Debug("Attempting to get privileged access token from service"); var secret = await _secretRepository.GetSecretAsync(PrivilegedAccessSecretName); var totp = _totpService.Generate(secret); var token = await _tokenService.GetAccessToken(totp); _logger.Debug("Got privileged access token from service"); return(token); }
private async Task <string> GetOneTimePassword() { _logger.Debug("Attempting to get privileged access token from service using refresh token"); var secret = await _secretRepository.GetSecretAsync(PrivilegedAccessSecretName); var privilegedToken = _totpService.Generate(secret); _logger.Debug("Attempt to get privileged access token successfully"); return(privilegedToken); }