mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
Replace deprecated usage with non-deprecated equivalent
This commit is contained in:
1 parent
fcdc808b42
commit
bd59b54886
1 file changed
+3
-2
@@ -39,10 +39,11 @@ import jenkins.security.seed.UserSeedProperty;
|
||||
import jenkins.util.SystemProperties;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||
import org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher;
|
||||
|
||||
/**
|
||||
* Login filter with a change for Jenkins so that
|
||||
@@ -56,7 +57,7 @@ public final class AuthenticationProcessingFilter2 extends UsernamePasswordAuthe
|
||||
|
||||
@SuppressFBWarnings(value = "HARD_CODE_PASSWORD", justification = "This is a password parameter, not a password")
|
||||
public AuthenticationProcessingFilter2(String authenticationGatewayUrl) {
|
||||
setRequiresAuthenticationRequestMatcher(new AntPathRequestMatcher("/" + authenticationGatewayUrl, "POST"));
|
||||
setRequiresAuthenticationRequestMatcher(PathPatternRequestMatcher.withDefaults().matcher(HttpMethod.POST, "/" + authenticationGatewayUrl));
|
||||
// Jenkins/login.jelly & SetupWizard/authenticate-security-token.jelly
|
||||
setUsernameParameter("j_username");
|
||||
setPasswordParameter("j_password");
|
||||
|
||||
Reference in new issue
Block a user