public void doStart() throws Exception { if (_authenticator==null) { // Find out the Authenticator. if (Constraint.__BASIC_AUTH.equalsIgnoreCase(_authMethod)) _authenticator=new BasicAuthenticator(); else if (Constraint.__DIGEST_AUTH.equalsIgnoreCase(_authMethod)) _authenticator=new DigestAuthenticator(); else if(Constraint.__CERT_AUTH.equals(_authMethod) || Constraint.__CERT_AUTH2.equals(_authMethod)) _authenticator=(Authenticator)Loader.loadClass(ConstraintsSecurityHandler.class,"org.mortbay.jetty.security.ClientCertAuthenticator").newInstance(); else if (Constraint.__FORM_AUTH.equalsIgnoreCase(_authMethod)) _authenticator=new FormAuthenticator(); else Log.warn("Unknown Authentication method:"+_authMethod); } super.doStart(); }
} else if ("FORM".equals(authMethod)) { FormAuthenticator formAuthenticator = new FormAuthenticator(); webModuleData.setAttribute("authenticator", formAuthenticator); if (loginConfig.isSetFormLoginConfig()) { FormLoginConfigType formLoginConfig = loginConfig.getFormLoginConfig(); formAuthenticator.setLoginPage(formLoginConfig.getFormLoginPage().getStringValue()); formAuthenticator.setErrorPage(formLoginConfig.getFormErrorPage().getStringValue());
if (isLoginOrErrorPage(pathInContext)) return UserRealm.NOBODY;
String m=method.toString(false,true); if(Constraint.__FORM_AUTH.equals(m)) authenticator=_formAuthenticator=new FormAuthenticator(); else if(Constraint.__BASIC_AUTH.equals(m)) authenticator=new BasicAuthenticator(); _formAuthenticator.setLoginPage(loginPage.toString(false,true)); XmlParser.Node errorPage=formConfig.get("form-error-page"); if(errorPage!=null) _formAuthenticator.setErrorPage(ep);
if (isLoginOrErrorPage(pathInContext)) return SecurityHandler.__NOBODY;
public void doStart() throws Exception { if (_authenticator==null) { // Find out the Authenticator. if (Constraint.__BASIC_AUTH.equalsIgnoreCase(_authMethod)) _authenticator=new BasicAuthenticator(); else if (Constraint.__DIGEST_AUTH.equalsIgnoreCase(_authMethod)) _authenticator=new DigestAuthenticator(); else if (Constraint.__CERT_AUTH.equalsIgnoreCase(_authMethod)) _authenticator=new ClientCertAuthenticator(); else if (Constraint.__FORM_AUTH.equalsIgnoreCase(_authMethod)) _authenticator=new FormAuthenticator(); else Log.warn("Unknown Authentication method:"+_authMethod); } super.doStart(); }
!((FormAuthenticator)authenticator).isLoginOrErrorPage(pathInContext)))
!((FormAuthenticator)authenticator).isLoginOrErrorPage(pathInContext)))