Skip to content

Include AuthenticationRequest in AuthenticationException #16505

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

Merged
merged 5 commits into from
Mar 22, 2025

Conversation

amm0124
Copy link
Contributor

@amm0124 amm0124 commented Jan 30, 2025

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 30, 2025
@jzheaux jzheaux force-pushed the gh-16444 branch 2 times, most recently from 3ecbe0f to 872f77e Compare February 3, 2025 19:41
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @amm0124! I've left some feedback inline.

Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! I've left some additional inline feedback.

@jzheaux jzheaux self-assigned this Mar 20, 2025
@jzheaux jzheaux added in: core An issue in spring-security-core type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 20, 2025
@jzheaux jzheaux changed the title Add authRequest field to AuthenticationException Include AuthenticationRequest in AuthenticationException Mar 20, 2025
@jzheaux jzheaux added this to the 6.5.0-RC1 milestone Mar 20, 2025
jzheaux and others added 5 commits March 21, 2025 17:37
Store the authentication request details in the `authRequest` field of
`AuthenticationException` when an authentication exception occurs.

Closes spring-projectsgh-16444

Signed-off-by: amm0124 <amm0124@naver.com>
- Add getter for reading the request
- Update BadCredentialsMixing to ignore authentication
- Allow exception to be mutable

Issue spring-projectsgh-16444
- Isolated exception construction
- Isolated entry point subscription

Issue spring-projectsgh-16444
@jzheaux jzheaux merged commit 56e757a into spring-projects:main Mar 22, 2025
6 checks passed
@jzheaux
Copy link
Contributor

jzheaux commented Mar 22, 2025

Thanks for the PR, @amm0124! In addition to your contribution, I updated the Spring Security's authentication components to use the setter when throwing exceptions in 659e7d2. I also did a slight polish of your original contribution in order to facilitate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants