-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Remove unused RequestValidator class #7892
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
Conversation
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.
Pull Request Overview
This PR removes the unused RequestValidator
class and its tests, inlines redirect URI validation in AuthorizationCodeClient
, and cleans up related error codes and API metadata.
- Deletes
RequestValidator
and its spec file. - Inlines
redirectUri
validation inAuthorizationCodeClient
. - Removes
invalidPromptValue
entries from error codes, messages, and API review.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
lib/msal-common/test/request/RequestValidator.spec.ts | Removed tests covering RequestValidator |
lib/msal-common/src/request/RequestValidator.ts | Deleted the entire RequestValidator implementation |
lib/msal-common/src/error/ClientConfigurationErrorCodes.ts | Removed invalidPromptValue constant |
lib/msal-common/src/error/ClientConfigurationError.ts | Removed messages related to invalidPromptValue |
lib/msal-common/src/client/AuthorizationCodeClient.ts | Inlined redirect URI validation, removed import |
lib/msal-common/apiReview/msal-common.api.md | Cleaned up API metadata for removed prompt error code |
change/@azure-msal-common-76b2aadc-a06c-4ad6-b941-94031039267f.json | Bump patch version and note removal of RequestValidator |
Comments suppressed due to low confidence (2)
lib/msal-common/src/client/AuthorizationCodeClient.ts:252
- Add unit tests for this new inline redirect URI validation branch to verify that it throws the correct error (
redirectUriEmpty
) whenrequest.redirectUri
is missing.
if (!request.redirectUri) {
lib/msal-common/src/client/AuthorizationCodeClient.ts:252
- The PR deletes the
RequestValidator
class but only inlinesvalidateRedirectUri
. The other validation methods (validatePrompt
,validateClaims
,validateCodeChallengeParams
) have been removed without replacement—ensure any remaining callers are updated or migrate those validation checks.
if (!request.redirectUri) {
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.
Do we know why we are not using them anymore? Approving, just curious. They look very superficial checks anyway not much value add.
Some of these checks are still being done, just not with these helpers. They got refactored out at some point |
Removes unused
RequestValidator
class