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

Fix authentication flow with custom authentication extension. #6416

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

Thisara-Welmilla
Copy link
Contributor

@Thisara-Welmilla Thisara-Welmilla commented Feb 2, 2025

Issue:

Fix following issue:

  1. When the basic authenticator is engaged in the authentication flow, the handleRequest method for the basic authenticator is automatically triggered at the start, setting setCurrentAuthenticator to the basic authenticator. However, when the user provides a username and password, the handleResponse method is initiated, and at line [1], setCurrentAuthenticator is reset to null. Consequently, when selecting the appropriate authenticator, the system iterates through the list of authenticators in the step and checks if currentAuthenticator is null. As a result, the first authenticator in the step always gets selected.
  2. As the UserDefinedAuthenticatorEndpointConfig is not extended Serializable, when trying load the authenticator config from the context cache, there is an error ocurred. This UserDefinedAuthenticatorEndpointConfig does not required in the authentication flow, therefore skip adding that attribute of the localAuthenticator to cache.

[1].


[2].

@jenkins-is-staging
Copy link

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

Copy link

codecov bot commented Feb 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 47.15%. Comparing base (b78d6ad) to head (567f681).
Report is 33 commits behind head on master.

Files with missing lines Patch % Lines
...ramework/handler/step/impl/DefaultStepHandler.java 0.00% 7 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6416      +/-   ##
============================================
+ Coverage     45.99%   47.15%   +1.16%     
+ Complexity    15457    15234     -223     
============================================
  Files          1744     1745       +1     
  Lines        110303   105383    -4920     
  Branches      20091    19274     -817     
============================================
- Hits          50729    49695    -1034     
+ Misses        52307    48653    -3654     
+ Partials       7267     7035     -232     
Flag Coverage Δ
unit 30.52% <0.00%> (+0.16%) ⬆️

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/13098051382
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/13098051382

@Thisara-Welmilla Thisara-Welmilla force-pushed the fix-frameworkFlow branch 2 times, most recently from 983f139 to f945489 Compare February 3, 2025 04:44
@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

malithie
malithie previously approved these changes Feb 3, 2025
@jenkins-is-staging
Copy link

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

Copy link

sonarqubecloud bot commented Feb 3, 2025

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

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

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/13110804129

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