Skip to content

[v5] Remove unused RequestValidator class #7906

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

Open
wants to merge 1 commit into
base: msal-v5
Choose a base branch
from

Conversation

tnorling
Copy link
Collaborator

@tnorling tnorling commented Jul 3, 2025

v5 equivalent of #7892

@Copilot Copilot AI review requested due to automatic review settings July 3, 2025 21:41
@github-actions github-actions bot added documentation Related to documentation. msal-common Related to msal-common package labels Jul 3, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Removes the unused RequestValidator class and its tests, inlines redirect URI validation in AuthorizationCodeClient, and cleans up related error codes and API surface.

  • Deleted RequestValidator implementation and its spec file
  • Removed invalidPromptValue from error codes and API review
  • Inlined redirectUri validation in AuthorizationCodeClient

Reviewed Changes

Copilot reviewed 6 out of 6 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 unit tests for RequestValidator
lib/msal-common/src/request/RequestValidator.ts Deleted unused RequestValidator implementation
lib/msal-common/src/error/ClientConfigurationErrorCodes.ts Removed invalidPromptValue error code
lib/msal-common/src/client/AuthorizationCodeClient.ts Inlined redirectUri validation and removed import
lib/msal-common/apiReview/msal-common.api.md Updated API review to drop invalidPromptValue entry
change/@azure-msal-common-76b2aadc-a06c-4ad6-b941-94031039267f.json Added patch changefile for removal
Comments suppressed due to low confidence (3)

lib/msal-common/src/error/ClientConfigurationErrorCodes.ts:11

  • Removing the public invalidPromptValue constant is a breaking change for any consumers handling this error code; consider deprecating it first or bumping the major version to follow semantic versioning.
export const emptyInputScopesError = "empty_input_scopes_error";

lib/msal-common/src/client/AuthorizationCodeClient.ts:225

  • The inlined redirectUri validation logic lacks unit tests; add tests in the AuthorizationCodeClient suite to cover cases where includeRedirectUri is false and request.redirectUri is empty.
            if (!request.redirectUri) {

lib/msal-common/src/client/AuthorizationCodeClient.ts:228

  • [nitpick] Inlining the same redirectUri check in multiple places duplicates validation logic; consider extracting a shared utility or retaining a centralized validator to improve maintainability.
                );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation. msal-common Related to msal-common package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant