Skip to content
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

feat: Changed the logic to detect token generation uri with parameterized content type. #11648

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

foogao
Copy link

@foogao foogao commented Oct 15, 2024

Description

In HTTP specification, the form of Content-Type as following:
Content-Type: [; key=value]

For examples:

Content-Type: text/html; charset=utf-8
Content-Type: multipart/form-data; boundary=boundary-string

But in the authz-keycloak plugin, the condition to decide if current request is for granting token from Keycloak must be full match the "application/x-www-form-urlencoded". It will cause some client libraries to be unable to obtain the token.

For example, the RestTemplate in SpringFramework, it will add parameter after the content-type directive automatically.

This pull request resolved this issue.

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request plugin labels Oct 15, 2024
@foogao foogao closed this Oct 16, 2024
@foogao foogao reopened this Oct 16, 2024
@foogao
Copy link
Author

foogao commented Nov 4, 2024

Hello @tzssangglass, @jenskeiner and @sshniro can you help to review my request? thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant