diff --git a/core/src/main/java/hudson/security/LegacySecurityRealm.java b/core/src/main/java/hudson/security/LegacySecurityRealm.java index 251eaba8af..e618ad2e0d 100644 --- a/core/src/main/java/hudson/security/LegacySecurityRealm.java +++ b/core/src/main/java/hudson/security/LegacySecurityRealm.java @@ -23,6 +23,15 @@ public final class LegacySecurityRealm extends SecurityRealm implements Authenti return null; } + /** + * To have the username/password authenticated by the container, + * submit the form to the URL defined by the servlet spec. + */ + @Override + public String getLoginUrl() { + return "j_security_check"; + } + public Descriptor getDescriptor() { return DESCRIPTOR; } diff --git a/core/src/main/java/hudson/security/SecurityRealm.java b/core/src/main/java/hudson/security/SecurityRealm.java index 162c1c3281..e580826d3a 100644 --- a/core/src/main/java/hudson/security/SecurityRealm.java +++ b/core/src/main/java/hudson/security/SecurityRealm.java @@ -33,6 +33,14 @@ public abstract class SecurityRealm implements Describable, Exten */ public abstract AuthenticationManager createAuthenticationManager(); + /** + * Returns the URL to submit a form for the authentication. + * Normally there's no need to override this. + */ + public String getLoginUrl() { + return "j_acegi_security_check"; + } + /** * Picks up the instance of the given type from the spring context. * If there are multiple beans of the same type or if there are none, diff --git a/core/src/main/resources/hudson/model/Hudson/login.jelly b/core/src/main/resources/hudson/model/Hudson/login.jelly index 3d8d7fb2bf..c664cf04c9 100644 --- a/core/src/main/resources/hudson/model/Hudson/login.jelly +++ b/core/src/main/resources/hudson/model/Hudson/login.jelly @@ -4,7 +4,7 @@
-
+
User: