-
Notifications
You must be signed in to change notification settings - Fork 155
Deprecate ResponseMode.QUERY in system browser auth flow, automatically override to FORM_POST with warning #1004
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?
Changes from all commits
ab9cfc2
7379d7b
34a34ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # This file is located under the Maven/Gradle build output directory: | ||
| # msal4j-persistence-extension/target/test-classes/log4j.properties | ||
| # It should not be tracked in version control and should be removed | ||
| # from the repository, with the entire `target/` directory ignored | ||
| # via .gitignore (or equivalent). | ||
| # | ||
| # The contents below were removed to prevent this accidental artifact | ||
| # from affecting runtime logging configuration. Do not add any active | ||
| # Log4j configuration here; instead, place it under src/test/resources | ||
| # or src/main/resources as appropriate. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,9 +113,18 @@ private AuthorizationRequestUrlParameters(Builder builder) { | |
| } | ||
|
|
||
| if (builder.responseMode != null) { | ||
| this.responseMode = builder.responseMode; | ||
| requestParameters.put("response_mode", | ||
| builder.responseMode.toString()); | ||
| // Override QUERY with FORM_POST as QUERY is deprecated | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than add the logic to check for That way, this constructor stays the same and only valid values get set in the builder.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, we should not change the AuthCodeUri for all scenarios. Or change it, but deprecate the "GetAuthorizationRequestUri" existing API and add a "GetAuthorizationRequestUriWithPost" and fully deprecate ResponseMode param |
||
| if (builder.responseMode == ResponseMode.QUERY) { | ||
| LOG.warn("ResponseMode.QUERY is deprecated and will be removed in a future release. " + | ||
| "Automatically overriding to ResponseMode.FORM_POST."); | ||
| this.responseMode = ResponseMode.FORM_POST; | ||
| requestParameters.put("response_mode", | ||
| ResponseMode.FORM_POST.toString()); | ||
| } else { | ||
| this.responseMode = builder.responseMode; | ||
| requestParameters.put("response_mode", | ||
| builder.responseMode.toString()); | ||
| } | ||
| } else { | ||
| this.responseMode = ResponseMode.FORM_POST; | ||
| requestParameters.put("response_mode", | ||
|
|
@@ -368,6 +377,7 @@ public Builder nonce(String val) { | |
|
|
||
| /** | ||
| * Specifies the method that should be used to send the authentication result to your app. | ||
| * @deprecated ResponseMode.QUERY is deprecated. If you pass ResponseMode.QUERY, it will be automatically overridden to ResponseMode.FORM_POST. | ||
| */ | ||
| public Builder responseMode(ResponseMode val) { | ||
| this.responseMode = val; | ||
|
|
||
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.
This file can be removed entirely, it's in the "target" directory which means it's just a file that gets made when building the project and seems to just have some comments from Copilot?