Skip to content

Commit

Permalink
Merge pull request #101 from mdsol/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
prajon84 authored Feb 20, 2024
2 parents b08ebb8 + 303164f commit fb6b823
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changes in Medidata.MAuth
## v5.1.7
- **[Core]** Fix preprocessor for sync methods

## v5.1.6
- **[Core]** Fix bug in MAuth verification.

Expand Down
2 changes: 1 addition & 1 deletion src/Medidata.MAuth.Core/HttpRequestMessageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public async static Task<byte[]> GetRequestContentAsBytesAsync(this HttpRequestM
: await request.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
}

#if NET5_0
#if NET5_0_OR_GREATER
public static byte[] GetRequestContentAsBytes(this HttpRequestMessage request)
{
using var memoryStream = new MemoryStream();
Expand Down
2 changes: 1 addition & 1 deletion src/Medidata.MAuth.Core/IMAuthCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal interface IMAuthCore

(string mAuthHeaderKey, string mAuthTimeHeaderKey) GetHeaderKeys();

#if NET5_0
#if NET5_0_OR_GREATER
HttpRequestMessage SignSync(HttpRequestMessage request, MAuthSigningOptions options);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/Medidata.MAuth.Core/MAuthCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ internal string CalculatePayload(HttpRequestMessage request, PrivateKeyAuthentic
return (Constants.MAuthHeaderKey, Constants.MAuthTimeHeaderKey);
}

#if NET5_0
#if NET5_0_OR_GREATER
public HttpRequestMessage SignSync(HttpRequestMessage request, MAuthSigningOptions options)
{
var authInfo = new PrivateKeyAuthenticationInfo()
Expand Down
2 changes: 1 addition & 1 deletion src/Medidata.MAuth.Core/MAuthCoreV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ internal string CalculatePayload(
return (Constants.MAuthHeaderKeyV2, Constants.MAuthTimeHeaderKeyV2);
}

#if NET5_0
#if NET5_0_OR_GREATER
/// <summary>
/// Signs an HTTP request with the MAuth-specific authentication information.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Medidata.MAuth.Core/MAuthSigningHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected override async Task<HttpResponseMessage> SendAsync(
.ConfigureAwait(continueOnCapturedContext: false);
}

#if NET5_0
#if NET5_0_OR_GREATER
/// <summary>
/// Signs an HTTP request with the MAuth-specific authentication information and sends the request to the
/// inner handler to send to the server a synchronous operation.
Expand Down
2 changes: 1 addition & 1 deletion tests/Medidata.MAuth.CoreTests/MAuthAuthenticatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public static async Task AuthenticateRequest_WithMWSV2Request_AfterNumberOfAttem
Assert.Equal(HttpStatusCode.ServiceUnavailable, innerException.Responses.First().StatusCode);
}

#if NET5_0
#if NET5_0_OR_GREATER
[Theory]
[InlineData("GET")]
[InlineData("DELETE")]
Expand Down
2 changes: 1 addition & 1 deletion tests/Medidata.MAuth.CoreTests/MAuthSigningHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static async Task SendAsync_WithSignVersionsMWSAndMWSV2_WillSignWithBothM
Assert.Equal(testData.SignedTime, long.Parse(actual.MAuthTimeHeaderV2).FromUnixTimeSeconds());
}

#if NET5_0
#if NET5_0_OR_GREATER
[Theory]
[InlineData("GET")]
[InlineData("DELETE")]
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>5.1.6</Version>
<Version>5.1.7</Version>
</PropertyGroup>
</Project>

0 comments on commit fb6b823

Please sign in to comment.