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

Generic Error Response on Token Endpoint #2691

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KaveeshaPiumini
Copy link

@KaveeshaPiumini KaveeshaPiumini commented Jan 24, 2025

Purpose

This PR unifies the error_description of the the OAuth2 authentication requests with the following grant types.

  • Refresh token grant
  • Client credentials grant
  • Password grant
  • Token exchange grant
  • SAML 2.0 bearer grant
  • Organization switch grant

When the Client ID/Client Secret is incorrect, now the related endpoints will return the following error.

{
    "error_description": "Client credentials are invalid.",
    "error": "invalid_client"
}

Related Issue

piraveena
piraveena previously approved these changes Jan 24, 2025
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/12947480266

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.07%. Comparing base (72b70c8) to head (f4067e3).
Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
...client/authentication/OAuthClientAuthnService.java 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2691      +/-   ##
============================================
- Coverage     55.94%   54.07%   -1.88%     
- Complexity     8772     8845      +73     
============================================
  Files           654      654              
  Lines         50916    54016    +3100     
  Branches       9985    11163    +1178     
============================================
+ Hits          28485    29208     +723     
- Misses        18365    20566    +2201     
- Partials       4066     4242     +176     
Flag Coverage Δ
unit 39.50% <33.33%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/12947480266
Status: failure

@KaveeshaPiumini KaveeshaPiumini force-pushed the Generic-Error-Token-Endpoint branch from 93c55fe to fdab7f3 Compare January 28, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants