Skip to content

Commit ad54324

Browse files
Merge pull request #14 from okta/lr-verify-13-ginivit-pr
* Fixes #12 * Upgrades TLS version when running on .net framework < 4.7
2 parents ac63a97 + 6b5c27c commit ad54324

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

Okta.Auth.Sdk.UnitTests/AuthenticationClientShould.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,26 @@
77
using NSubstitute;
88
using Okta.Auth.Sdk.UnitTests.Internal;
99
using Okta.Sdk.Abstractions;
10+
using Okta.Sdk.Abstractions.Configuration;
1011
using Xunit;
1112

1213
namespace Okta.Auth.Sdk.UnitTests
1314
{
1415
public class AuthenticationClientShould
1516
{
17+
[Fact]
18+
public void BeConstructedWithTheCorrectConfiguration()
19+
{
20+
var client = new AuthenticationClient(new OktaClientConfiguration
21+
{
22+
OktaDomain = "https://foo.oktapreview.com/",
23+
Token = "abc123notreal"
24+
});
25+
26+
client.Configuration.OktaDomain.Should().Be("https://foo.oktapreview.com/");
27+
client.Configuration.Token.Should().Be("abc123notreal");
28+
}
29+
1630
[Fact]
1731
public async Task ForgotPasswordWithEmailFactor()
1832
{

Okta.Auth.Sdk/Okta.Auth.Sdk.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard1.3</TargetFramework>
5-
<Version>1.0.0-beta</Version>
5+
<Version>1.0.1-beta</Version>
66
</PropertyGroup>
77

88
<PropertyGroup>

Okta.Sdk.Abstractions/BaseOktaClient.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ public class BaseOktaClient : IOktaClient
2222
protected IDataStore _dataStore;
2323
protected RequestContext _requestContext;
2424

25+
static BaseOktaClient()
26+
{
27+
System.AppContext.SetSwitch("Switch.System.Net.DontEnableSystemDefaultTlsVersions", false);
28+
}
29+
30+
/// <summary>
31+
/// Initializes a new instance of the <see cref="BaseOktaClient"/> class.
32+
/// </summary>
33+
public BaseOktaClient()
34+
{
35+
}
36+
2537
/// <summary>
2638
/// Initializes a new instance of the <see cref="BaseOktaClient"/> class.
2739
/// </summary>

Okta.Sdk.Abstractions/Okta.Sdk.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard1.3</TargetFramework>
5-
<Version>1.0.0-beta</Version>
5+
<Version>1.0.1-beta</Version>
66
</PropertyGroup>
77

88
<ItemGroup>

0 commit comments

Comments
 (0)