Skip to content

Commit

Permalink
Making TryConvertToSecurityKey public
Browse files Browse the repository at this point in the history
  • Loading branch information
trwalke committed Jan 10, 2025
1 parent d9ab07a commit 057102d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Microsoft.IdentityModel.Tokens/JsonWebKeyConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,16 @@ public static JsonWebKey ConvertFromECDsaSecurityKey(ECDsaSecurityKey key)
}
#endif

internal static bool TryConvertToSecurityKey(JsonWebKey webKey, out SecurityKey key)
/// <summary>
/// This will attempt to convert the <see cref="JsonWebKey"/> to a <see cref="SecurityKey"/>.
/// </summary>
/// <param name="webKey"><see cref="JsonWebKey"/></param>
/// <param name="key"><see cref="SecurityKey"/></param>
public static bool TryConvertToSecurityKey(JsonWebKey webKey, out SecurityKey key)
{
if (webKey == null)
throw LogHelper.LogArgumentNullException(nameof(webKey));

if (webKey.ConvertedSecurityKey != null)
{
key = webKey.ConvertedSecurityKey;
Expand Down
1 change: 1 addition & 0 deletions src/Microsoft.IdentityModel.Tokens/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor.IncludeKeyIdInHeader.get -> bool
Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor.IncludeKeyIdInHeader.set -> void
static Microsoft.IdentityModel.Tokens.JsonWebKeyConverter.TryConvertToSecurityKey(Microsoft.IdentityModel.Tokens.JsonWebKey webKey, out Microsoft.IdentityModel.Tokens.SecurityKey key) -> bool

0 comments on commit 057102d

Please sign in to comment.