Skip to content

Commit 9982293

Browse files
committed
Some comments
1 parent 884b3c6 commit 9982293

File tree

5 files changed

+37
-12
lines changed

5 files changed

+37
-12
lines changed

src/client/Microsoft.Identity.Client/AuthScheme/IAuthenticationOperation.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Licensed under the MIT License.
33

44
using System.Collections.Generic;
5-
using System.Threading.Tasks;
6-
using Microsoft.Identity.Client.Cache.Items;
75

86
namespace Microsoft.Identity.Client.AuthScheme
97
{

src/client/Microsoft.Identity.Client/AuthScheme/PoP/MtlsPopAuthenticationOperation.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
using System.Collections.Generic;
55
using System.Security.Cryptography;
66
using System.Security.Cryptography.X509Certificates;
7+
using System.Threading;
8+
using System.Threading.Tasks;
79
using Microsoft.Identity.Client.Internal;
810
using Microsoft.Identity.Client.OAuth2;
911
using Microsoft.Identity.Client.Utils;
1012

1113
namespace Microsoft.Identity.Client.AuthScheme.PoP
1214
{
13-
internal class MtlsPopAuthenticationOperation : IAuthenticationOperation
15+
internal class MtlsPopAuthenticationOperation : IAuthenticationOperation2
1416
{
1517
private readonly X509Certificate2 _mtlsCert;
1618

@@ -36,11 +38,6 @@ public IReadOnlyDictionary<string, string> GetTokenRequestParams()
3638
};
3739
}
3840

39-
public void FormatResult(AuthenticationResult authenticationResult)
40-
{
41-
//no-op
42-
}
43-
4441
private static string ComputeX5tS256KeyId(X509Certificate2 certificate)
4542
{
4643
// Extract the raw bytes of the certificate’s public key.
@@ -55,5 +52,15 @@ private static string ComputeX5tS256KeyId(X509Certificate2 certificate)
5552
return Base64UrlHelpers.Encode(hash);
5653
}
5754
}
55+
56+
public Task FormatResultAsync(AuthenticationResult authenticationResult, CancellationToken cancellationToken = default)
57+
{
58+
return Task.CompletedTask;
59+
}
60+
61+
public void FormatResult(AuthenticationResult authenticationResult)
62+
{
63+
// no-op
64+
}
5865
}
5966
}

src/client/Microsoft.Identity.Client/AuthScheme/PoP/PopBrokerAuthenticationOperation.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77
using System.Text;
8+
using System.Threading;
89
using System.Threading.Tasks;
910
using Microsoft.Identity.Client.Cache.Items;
1011
using Microsoft.Identity.Client.Internal;
@@ -15,7 +16,7 @@ namespace Microsoft.Identity.Client.AuthScheme.PoP
1516
//Authentication Scheme used when MSAL Broker and pop are used together.
1617
//Tokens acquired from brokers will not be saved in the local ache and MSAL will not search the local cache during silent authentication.
1718
//This is because tokens are cached in the broker instead so MSAL will rely on the broker's cache for silent requests.
18-
internal class PopBrokerAuthenticationOperation : IAuthenticationOperation
19+
internal class PopBrokerAuthenticationOperation : IAuthenticationOperation2
1920
{
2021
public int TelemetryTokenType => TelemetryTokenTypeConstants.Pop;
2122

@@ -25,9 +26,14 @@ internal class PopBrokerAuthenticationOperation : IAuthenticationOperation
2526

2627
public string AccessTokenType => Constants.PoPTokenType;
2728

29+
public Task FormatResultAsync(AuthenticationResult authenticationResult, CancellationToken cancellationToken = default)
30+
{
31+
return Task.CompletedTask;
32+
}
33+
2834
public void FormatResult(AuthenticationResult authenticationResult)
2935
{
30-
//no-op
36+
// no-op
3137
}
3238

3339
public IReadOnlyDictionary<string, string> GetTokenRequestParams()

src/client/Microsoft.Identity.Client/AuthScheme/SSHCertificates/SSHCertAuthenticationOperation.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
using System;
55
using System.Collections.Generic;
6+
using System.Threading;
7+
using System.Threading.Tasks;
68
using Microsoft.Identity.Client.Cache.Items;
79
using Microsoft.Identity.Client.Internal;
810
using Microsoft.Identity.Client.OAuth2;
911

1012
namespace Microsoft.Identity.Client.AuthScheme.SSHCertificates
1113
{
12-
internal class SSHCertAuthenticationOperation : IAuthenticationOperation
14+
internal class SSHCertAuthenticationOperation : IAuthenticationOperation2
1315
{
1416
internal const string SSHCertTokenType = "ssh-cert";
1517
private readonly string _jwk;
@@ -40,6 +42,11 @@ public SSHCertAuthenticationOperation(string keyId, string jwk)
4042

4143
public string KeyId { get; }
4244

45+
public Task FormatResultAsync(AuthenticationResult authenticationResult, CancellationToken cancellationToken = default)
46+
{
47+
return Task.CompletedTask;
48+
}
49+
4350
public void FormatResult(AuthenticationResult authenticationResult)
4451
{
4552
// no-op

src/client/Microsoft.Identity.Client/Extensibility/ExternalBoundTokenScheme.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
// Licensed under the MIT License.
33

44
using System.Collections.Generic;
5+
using System.Threading;
6+
using System.Threading.Tasks;
57
using Microsoft.Identity.Client.AuthScheme;
68
using Microsoft.Identity.Client.Cache.Items;
79
using Microsoft.Identity.Client.Internal;
810
using Microsoft.Identity.Client.Utils;
911

1012
namespace Microsoft.Identity.Client.Extensibility
1113
{
12-
internal class ExternalBoundTokenScheme : IAuthenticationOperation
14+
internal class ExternalBoundTokenScheme : IAuthenticationOperation2
1315
{
1416
private readonly string _keyId;
1517
private readonly string _tokenType;
@@ -28,6 +30,11 @@ public ExternalBoundTokenScheme(string keyId, string expectedTokenTypeFromEsts =
2830

2931
public string AccessTokenType => _tokenType;
3032

33+
public Task FormatResultAsync(AuthenticationResult authenticationResult, CancellationToken cancellationToken = default)
34+
{
35+
return Task.CompletedTask;
36+
}
37+
3138
public void FormatResult(AuthenticationResult authenticationResult)
3239
{
3340
// no-op

0 commit comments

Comments
 (0)