Skip to content

Fix misleading variable name in authentication filter #17751

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class UsernamePasswordAuthenticationFilter extends AbstractAuthentication

public static final String SPRING_SECURITY_FORM_PASSWORD_KEY = "password";

private static final RequestMatcher DEFAULT_ANT_PATH_REQUEST_MATCHER = PathPatternRequestMatcher.withDefaults()
private static final RequestMatcher DEFAULT_PATH_REQUEST_MATCHER = PathPatternRequestMatcher.withDefaults()
.matcher(HttpMethod.POST, "/login");

private String usernameParameter = SPRING_SECURITY_FORM_USERNAME_KEY;
Expand All @@ -63,11 +63,11 @@ public class UsernamePasswordAuthenticationFilter extends AbstractAuthentication
private boolean postOnly = true;

public UsernamePasswordAuthenticationFilter() {
super(DEFAULT_ANT_PATH_REQUEST_MATCHER);
super(DEFAULT_PATH_REQUEST_MATCHER);
}

public UsernamePasswordAuthenticationFilter(AuthenticationManager authenticationManager) {
super(DEFAULT_ANT_PATH_REQUEST_MATCHER, authenticationManager);
super(DEFAULT_PATH_REQUEST_MATCHER, authenticationManager);
}

@Override
Expand Down