-
Notifications
You must be signed in to change notification settings - Fork 434
Provide support to Log using ILogger #3265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
src/Microsoft.IdentityModel.Tokens/Extrensions/TokenValidationParametersExtensions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.IdentityModel.Tokens/Extrensions/TokenValidationParametersExtensions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.IdentityModel.Tokens/Extrensions/TokenValidationParametersExtensions.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.IdentityModel.Logging/Microsoft.IdentityModel.Logging.csproj
Show resolved
Hide resolved
src/Microsoft.IdentityModel.JsonWebTokens/JsonWebTokenHandler.ValidateToken.cs
Outdated
Show resolved
Hide resolved
62411d8 to
7476fcb
Compare
7476fcb to
98d6f3a
Compare
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
| ActivityId = activityId; | ||
| } | ||
|
|
||
| #pragma warning disable CS3001 // ILogger is not CLSCompliant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to mark these with
[CLSCompliant(false)]
| public LoggerContext(ILogger logger, string correlationId) | ||
| { | ||
| Logger = logger ?? throw new ArgumentNullException(nameof(logger)); | ||
| CorrelationId = correlationId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could check if the correlation id is a guid, if it is, then set the activity id with it
| } | ||
| } | ||
|
|
||
| Assert.True(logCount == theoryData.LogValues.Count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Use Assert.Equal for these.
This work creates an entry point for use of ILogger for capturing logs.
It sets a pattern that will be expanded to include additional logs, but first we want to establish an acceptable model.
This PR focuses on Validation of Lifetime, Issuer and Audience and will be expanded with other PR's.