Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enables nullable reference types for the OAuth2 introspection library by removing the <Nullable>disable</Nullable> setting and updating code to handle nullable references correctly.
Key changes include:
- Removing nullable disable directives from project files
- Adding null-forgiving operators and nullable annotations throughout the codebase
- Replacing custom JSON serialization with System.Text.Json
- Removing validation logic that checked for null TokenRetriever
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| SimpleJson.cs | Completely removed custom JSON serialization library |
| PipelineFactory.cs | Added nullable annotations and switched to System.Text.Json |
| MockHttpRequest.cs | Added null-forgiving operators and nullable property types |
| IntrospectionEndpointHandler.cs | Added nullable annotations and improved null handling |
| Introspection.cs | Added null-forgiving operators for test assertions |
| Configuration.cs | Removed test for null TokenRetriever validation and added nullable annotation |
| AssemlyInfo.cs | Added new assembly info file with console capture attribute |
| OAuth2IntrospectionOptions.cs | Made ClientId and ClientSecret nullable, removed TokenRetriever validation |
| Project files | Removed nullable disable directives |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...est/AspNetCore.Authentication.OAuth2Introspection.Tests/Util/IntrospectionEndpointHandler.cs
Outdated
Show resolved
Hide resolved
...est/AspNetCore.Authentication.OAuth2Introspection.Tests/Util/IntrospectionEndpointHandler.cs
Outdated
Show resolved
Hide resolved
7ebed11 to
45456d1
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
introspection/test/AspNetCore.Authentication.OAuth2Introspection.Tests/Util/IntrospectionEndpointHandler.cs:1
- The
clientAssertionvariable is created before checking if it's needed. This creates an unnecessary object whenoptions.ClientSecretis not null. Consider moving the creation inside the if block or after the time check.
// Copyright (c) Duende Software. All rights reserved.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… not test for such
…on.Tests/Util/IntrospectionEndpointHandler.cs Co-authored-by: Copilot <[email protected]>
Also use primary ctor
fccf6e8 to
cbbc499
Compare
Enable
nullableinOAuth2Introspection.