Skip to content

Commit 303164f

Browse files
authored
Merge pull request #100 from mdsol/eraffel/FixDirectives
Fix preprocessor symbols for sync methods
2 parents f752c0d + 30c8478 commit 303164f

9 files changed

+11
-8
lines changed

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changes in Medidata.MAuth
2+
## v5.1.7
3+
- **[Core]** Fix preprocessor for sync methods
4+
25
## v5.1.6
36
- **[Core]** Fix bug in MAuth verification.
47

Diff for: src/Medidata.MAuth.Core/HttpRequestMessageExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public async static Task<byte[]> GetRequestContentAsBytesAsync(this HttpRequestM
1414
: await request.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
1515
}
1616

17-
#if NET5_0
17+
#if NET5_0_OR_GREATER
1818
public static byte[] GetRequestContentAsBytes(this HttpRequestMessage request)
1919
{
2020
using var memoryStream = new MemoryStream();

Diff for: src/Medidata.MAuth.Core/IMAuthCore.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal interface IMAuthCore
1313

1414
(string mAuthHeaderKey, string mAuthTimeHeaderKey) GetHeaderKeys();
1515

16-
#if NET5_0
16+
#if NET5_0_OR_GREATER
1717
HttpRequestMessage SignSync(HttpRequestMessage request, MAuthSigningOptions options);
1818
#endif
1919
}

Diff for: src/Medidata.MAuth.Core/MAuthCore.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ internal string CalculatePayload(HttpRequestMessage request, PrivateKeyAuthentic
153153
return (Constants.MAuthHeaderKey, Constants.MAuthTimeHeaderKey);
154154
}
155155

156-
#if NET5_0
156+
#if NET5_0_OR_GREATER
157157
public HttpRequestMessage SignSync(HttpRequestMessage request, MAuthSigningOptions options)
158158
{
159159
var authInfo = new PrivateKeyAuthenticationInfo()

Diff for: src/Medidata.MAuth.Core/MAuthCoreV2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ internal string CalculatePayload(
165165
return (Constants.MAuthHeaderKeyV2, Constants.MAuthTimeHeaderKeyV2);
166166
}
167167

168-
#if NET5_0
168+
#if NET5_0_OR_GREATER
169169
/// <summary>
170170
/// Signs an HTTP request with the MAuth-specific authentication information.
171171
/// </summary>

Diff for: src/Medidata.MAuth.Core/MAuthSigningHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected override async Task<HttpResponseMessage> SendAsync(
6868
.ConfigureAwait(continueOnCapturedContext: false);
6969
}
7070

71-
#if NET5_0
71+
#if NET5_0_OR_GREATER
7272
/// <summary>
7373
/// Signs an HTTP request with the MAuth-specific authentication information and sends the request to the
7474
/// inner handler to send to the server a synchronous operation.

Diff for: tests/Medidata.MAuth.CoreTests/MAuthAuthenticatorTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public static async Task AuthenticateRequest_WithMWSV2Request_AfterNumberOfAttem
416416
Assert.Equal(HttpStatusCode.ServiceUnavailable, innerException.Responses.First().StatusCode);
417417
}
418418

419-
#if NET5_0
419+
#if NET5_0_OR_GREATER
420420
[Theory]
421421
[InlineData("GET")]
422422
[InlineData("DELETE")]

Diff for: tests/Medidata.MAuth.CoreTests/MAuthSigningHandlerTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static async Task SendAsync_WithSignVersionsMWSAndMWSV2_WillSignWithBothM
9494
Assert.Equal(testData.SignedTime, long.Parse(actual.MAuthTimeHeaderV2).FromUnixTimeSeconds());
9595
}
9696

97-
#if NET5_0
97+
#if NET5_0_OR_GREATER
9898
[Theory]
9999
[InlineData("GET")]
100100
[InlineData("DELETE")]

Diff for: version.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<Version>5.1.6</Version>
4+
<Version>5.1.7</Version>
55
</PropertyGroup>
66
</Project>

0 commit comments

Comments
 (0)