Skip to content

docs: correct failureUrl Javadoc for custom login page - #19492

Open
arimu1 wants to merge 1 commit into
spring-projects:mainfrom
arimu1:docs/gh-9229-failureurl-javadoc
Open

docs: correct failureUrl Javadoc for custom login page#19492
arimu1 wants to merge 1 commit into
spring-projects:mainfrom
arimu1:docs/gh-9229-failureurl-javadoc

Conversation

@arimu1

@arimu1 arimu1 commented Aug 1, 2026

Copy link
Copy Markdown

Description

Fixes #9229

The failureUrl(String) Javadoc stated that the method is a shortcut for
failureHandler(AuthenticationFailureHandler), which is incorrect.

failureUrl behavior depends on whether a custom login page is configured:

  • Custom login page: the application must process the failure URL to generate an error page.
  • No custom login page: the framework processes the failure URL and generates the default error page (default login page with an error message); any application mapping for that URL is ignored.

This documentation applies to formLogin, oauth2Login, and saml2Login via AbstractAuthenticationFilterConfigurer.

Related issues

The failureUrl Javadoc incorrectly described the method as a shortcut for
failureHandler. Behavior depends on whether a custom login page is set:
with a custom page the application must handle the URL; without one the
framework generates the default error page.

Fixes spring-projects#9229

Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AbstractAuthenticationFilterConfigurer failureUrl Javadoc is incorrect

2 participants