-
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.
Add logging to the new validation model (#3054)
* Added Microsoft.Extensions.Logging.Abstractions to Microsoft.IdentityModel.Tokens to access ILogger * Added LoggingEventIds to store event ids used by the logging methods in M.IM.Tokens * Added logging to ValidationError and ValidatedToken to log the results obtained from ValidateTokenAsync after the fact. * Moved dependency version to dependencies.props * Update src/Microsoft.IdentityModel.Tokens/Validation/Results/ValidatedToken.cs Co-authored-by: Westin Musser <127992899+westin-m@users.noreply.github.com> * Sorted dependency versions based on PR feedback --------- Co-authored-by: Westin Musser <127992899+westin-m@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
125 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Microsoft.IdentityModel.Tokens | ||
{ | ||
internal static class LoggingEventId | ||
{ | ||
// TokenValidation EventIds 100+ | ||
internal static readonly EventId TokenValidationFailed = new(100, "TokenValidationFailed"); | ||
internal static readonly EventId TokenValidationSucceeded = new(101, "TokenValidationSucceeded"); | ||
} | ||
} |
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