Repository navigation
Conversation
Fixes keycloak#54134 Signed-off-by: Atiqur Rahman <rahman.atiqur.pro@gmail.com>
Signed-off-by: Atiqur Rahman <rahman.atiqur.pro@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A null description for unsupported response types can cause error-page rendering to fail instead of returning the intended response.
1 open issue
What changed in this PR
Addresses #54134 by separating OAuth error codes from human-readable descriptions in authorization endpoint JSON responses.
Changes:
- Pass explicit OAuth error codes through error-page rendering.
- Preserve legacy formatting for unrelated JSON errors.
- Add regression coverage and upgrade guidance.
| File | Description |
|---|---|
| tests/base/src/test/java/org/keycloak/tests/oidc/AuthorizationEndpointJsonErrorTest.java | Tests JSON, HTML, localization, redirects, and direct grants. |
| services/src/main/java/org/keycloak/services/ErrorPageException.java | Adds an OAuth-aware error factory. |
| services/src/main/java/org/keycloak/protocol/oidc/endpoints/request/AuthorizationEndpointRequestParserProcessor.java | Assigns codes to request parsing errors. |
| services/src/main/java/org/keycloak/protocol/oidc/endpoints/AuthorizationEndpointChecker.java | Separates validation codes and descriptions. |
| services/src/main/java/org/keycloak/protocol/oidc/endpoints/AuthorizationEndpoint.java | Assigns codes to authorization failures. |
| services/src/main/java/org/keycloak/forms/login/freemarker/FreeMarkerLoginFormsProvider.java | Renders separate JSON error fields. |
| server-spi-private/src/main/java/org/keycloak/forms/login/LoginFormsProvider.java | Adds a backward-compatible provider overload. |
| docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc | Documents the JSON response change. |
Review effort: Balanced
Related to keycloak#54134 Signed-off-by: Atiqur Rahman <rahman.atiqur.pro@gmail.com>
mposolda
approved these changes
Oct 27, 2026
Contributor
There was a problem hiding this comment.
@atiqur-rahman-pro Thanks!
Contributor
Author
|
@rmartinc please can you merge it ? |
ruchikajha95
pushed a commit
to ruchikajha95/keycloak
that referenced
this pull request
Nov 3, 2026
keycloak#54194) Fixes keycloak#54134 Signed-off-by: Atiqur Rahman <rahman.atiqur.pro@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #54134
Authorization endpoint JSON errors currently put localized message text in
error. Return an OAuth error code inerrorand the localized message inerror_descriptionso clients can handle failures reliably.Preserves existing HTTP statuses, HTML responses, validated redirects, and direct-grant error formatting. Includes upgrade documentation and regression coverage for GET/POST requests and localized descriptions.