-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added internal virtual on TokenHandler (#3084)
Add AadIssuer with ValidationParameters Added tests to AadIssuerValidator for ValidationParameters Co-authored-by: id4s <[email protected]>
- Loading branch information
1 parent
658604a
commit 442baa3
Showing
25 changed files
with
867 additions
and
99 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/Microsoft.IdentityModel.JsonWebTokens/InternalAPI.Unshipped.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/Microsoft.IdentityModel.Tokens/TokenHandler.Internal.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using static Microsoft.IdentityModel.Logging.LogHelper; | ||
|
||
namespace Microsoft.IdentityModel.Tokens | ||
{ | ||
/// <summary> | ||
/// Defines properties shared across all security token handlers. | ||
/// </summary> | ||
public abstract partial class TokenHandler | ||
{ | ||
internal virtual Task<ValidationResult<ValidatedToken>> ValidateTokenAsync( | ||
string token, | ||
ValidationParameters validationParameters, | ||
CallContext callContext, | ||
CancellationToken cancellationToken) | ||
{ | ||
throw LogExceptionMessage( | ||
new NotImplementedException( | ||
FormatInvariant( | ||
LogMessages.IDX10267, | ||
MarkAsNonPII("internal virtual Task<ValidationResult<ValidatedToken>> " + | ||
"ValidateTokenAsync(string token, ValidationParameters validationParameters, CallContext callContext, CancellationToken cancellationToken)"), | ||
MarkAsNonPII(GetType().FullName)))); | ||
} | ||
|
||
internal virtual Task<ValidationResult<ValidatedToken>> ValidateTokenAsync( | ||
SecurityToken token, | ||
ValidationParameters validationParameters, | ||
CallContext callContext, | ||
CancellationToken cancellationToken) | ||
{ | ||
throw LogExceptionMessage( | ||
new NotImplementedException( | ||
FormatInvariant( | ||
LogMessages.IDX10267, | ||
MarkAsNonPII("internal virtual Task<ValidationResult<ValidatedToken>> " + | ||
"ValidateTokenAsync(SecurityToken token, ValidationParameters validationParameters, CallContext callContext, CancellationToken cancellationToken)"), | ||
MarkAsNonPII(GetType().FullName)))); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.