Skip to content

Commit 3b0bfd3

Browse files
Iwa timeoutfix and newrelease (#153)
* IWA Timeout update * log warning * Update changelog and references to 0.5.3 * Update README to default to 0.5.3 * update test to new IWA Timeout * Updating logging condition
1 parent 6fd773b commit 3b0bfd3

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.5.3] - 2022-09-28
8+
### Fixed
9+
- Increase IWA Timeout to 15 second and log WS-Trust endpoint error
10+
711
## [0.5.2] - 2022-09-28
812
### Fixed
913
- Option `--resource` is not needed if option `--scope` is provided.
@@ -73,7 +77,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7377
### Added
7478
- Initial project release.
7579

76-
[Unreleased]: https://github.com/AzureAD/microsoft-authentication-cli/compare/0.5.2...HEAD
80+
[Unreleased]: https://github.com/AzureAD/microsoft-authentication-cli/compare/0.5.3...HEAD
81+
[0.5.3]: https://github.com/AzureAD/microsoft-authentication-cli/compare/0.5.2...0.5.3
7782
[0.5.2]: https://github.com/AzureAD/microsoft-authentication-cli/compare/0.5.1...0.5.2
7883
[0.5.1]: https://github.com/AzureAD/microsoft-authentication-cli/compare/0.5.0...0.5.1
7984
[0.5.0]: https://github.com/AzureAD/microsoft-authentication-cli/compare/0.4.0...0.5.0

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Microsoft Authentication CLI
22

33
[![Tests](https://shields.io/github/workflow/status/AzureAD/microsoft-authentication-cli/Build%20and%20Test/main?style=for-the-badge&logo=github)](https://github.com/AzureAD/microsoft-authentication-cli/actions/workflows/dotnet-test.yml)
4-
[![Release](https://shields.io/github/v/release/AzureAD/microsoft-authentication-cli?display_name=tag&include_prereleases&sort=semver&style=for-the-badge&logo=github)](https://github.com/AzureAD/microsoft-authentication-cli/releases/tag/0.5.2)
5-
![GitHub release (latest by SemVer)](https://img.shields.io/github/downloads/azuread/microsoft-authentication-cli/0.5.2/total?logo=github&style=for-the-badge&color=blue)
4+
[![Release](https://shields.io/github/v/release/AzureAD/microsoft-authentication-cli?display_name=tag&include_prereleases&sort=semver&style=for-the-badge&logo=github)](https://github.com/AzureAD/microsoft-authentication-cli/releases/tag/0.5.3)
5+
![GitHub release (latest by SemVer)](https://img.shields.io/github/downloads/azuread/microsoft-authentication-cli/0.5.3/total?logo=github&style=for-the-badge&color=blue)
66
[![License](https://shields.io/badge/license-MIT-purple?style=for-the-badge)](./LICENSE.txt)
77

88
---
@@ -34,17 +34,17 @@ provide a means of downloading the latest release, so you **must** specify your
3434
To install the application, run
3535

3636
```powershell
37-
# 0.5.2 is an example. See https://github.com/AzureAD/microsoft-authentication-cli/releases for the latest.
38-
$env:AZUREAUTH_VERSION = '0.5.2'
37+
# 0.5.3 is an example. See https://github.com/AzureAD/microsoft-authentication-cli/releases for the latest.
38+
$env:AZUREAUTH_VERSION = '0.5.3'
3939
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
4040
iex "& { $(irm https://raw.githubusercontent.com/AzureAD/microsoft-authentication-cli/${env:AZUREAUTH_VERSION}/install/install.ps1) } -Verbose"
4141
```
4242

4343
Or, if you want a method more resilient to failure than `Invoke-Expression`, run
4444

4545
```powershell
46-
# 0.5.2 is an example. See https://github.com/AzureAD/microsoft-authentication-cli/releases for the latest.
47-
$env:AZUREAUTH_VERSION = '0.5.2'
46+
# 0.5.3 is an example. See https://github.com/AzureAD/microsoft-authentication-cli/releases for the latest.
47+
$env:AZUREAUTH_VERSION = '0.5.3'
4848
$script = "${env:TEMP}\install.ps1"
4949
$url = "https://raw.githubusercontent.com/AzureAD/microsoft-authentication-cli/${env:AZUREAUTH_VERSION}/install/install.ps1"
5050
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@@ -64,8 +64,8 @@ release, so you **must** specify your desired version via the `$AZUREAUTH_VERSIO
6464
To install the application, run
6565

6666
```bash
67-
# 0.5.2 is an example. See https://github.com/AzureAD/microsoft-authentication-cli/releases for the latest.
68-
export AZUREAUTH_VERSION='0.5.2'
67+
# 0.5.3 is an example. See https://github.com/AzureAD/microsoft-authentication-cli/releases for the latest.
68+
export AZUREAUTH_VERSION='0.5.3'
6969
curl -sL https://raw.githubusercontent.com/AzureAD/microsoft-authentication-cli/$AZUREAUTH_VERSION/install/install.sh | sh
7070
```
7171

src/MSALWrapper.Test/AuthFlow/IntegratedWindowsAuthenticationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public async Task GetTokenSilent_OperationCanceledException()
166166
authFlowResult.TokenResult.Should().Be(null);
167167
authFlowResult.Errors.Should().HaveCount(2);
168168
authFlowResult.Errors[0].Should().BeOfType(typeof(AuthenticationTimeoutException));
169-
authFlowResult.Errors[0].Message.Should().Be("Get Token Silent timed out after 00:00:06");
169+
authFlowResult.Errors[0].Message.Should().Be("Get Token Silent timed out after 00:00:15");
170170
authFlowResult.Errors[1].Should().BeOfType(typeof(NullTokenResultException));
171171
authFlowResult.AuthFlowName.Should().Be("IntegratedWindowsAuthentication");
172172
}

src/MSALWrapper/AuthFlow/IntegratedWindowsAuthentication.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class IntegratedWindowsAuthentication : IAuthFlow
2525
/// <summary>
2626
/// The integrated windows auth flow timeout.
2727
/// </summary>
28-
private TimeSpan integratedWindowsAuthTimeout = TimeSpan.FromSeconds(6);
28+
private TimeSpan integratedWindowsAuthTimeout = TimeSpan.FromSeconds(15);
2929
#endregion
3030

3131
/// <summary>
@@ -109,6 +109,10 @@ public async Task<AuthFlowResult> GetTokenAsync()
109109
{
110110
this.logger.LogWarning($"Msal Client Exception! (Not expected)\n{ex.Message}");
111111
this.errors.Add(ex);
112+
if (ex.Message.Contains("WS-Trust endpoint not found"))
113+
{
114+
this.logger.LogWarning($"IWA only works on Corp Net, please turn on VPN.");
115+
}
112116
}
113117
catch (NullReferenceException ex)
114118
{

0 commit comments

Comments
 (0)