spring-projects / spring-projects/spring-security

loginProcessingUrl() in Java config does not work as expected

Open
#5,071 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Summary

loginProcessingUrl() in Java config does not work the same way that the loginProcessingUrl attribute of the form-login element of the XML configuration.

Actual Behavior

Redirecting to the URL specified in AbstractAuthenticationFilterConfigurer#loginProcessingUrl ends in a 404 error.

Expected Behavior

Redirecting to the URL specified must start the login process.

Configuration

Please see this question on Stackoverflow.

Version

4.2.3 and 4.2.4

Sample

This is an example that uses my config but seems to work correctly, in two or three days I will try to post an example showing the problem.

https://github.com/jzheaux/spring-security-examples/tree/master/stackoverflow-48998865

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AbstractAuthenticationFilterConfigurer#loginProcessingUrl and the linked spring-security-examples reproduction, then compare the Java configuration behavior with the XML form-login behavior described in the issue. Confirm the failing request currently returns 404 and define done as the configured URL starting the login process instead.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.