handler.setUserRealm(userRealm); handler.setConstraintMappings(new ConstraintMapping[]{consoleMapping,curatorMapping}); handler.setAuthenticator(new BasicAuthenticator());
sendChallenge(realm,response);
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(); }
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(); }
String authMethod = loginConfig.getAuthMethod().getStringValue(); if ("BASIC".equals(authMethod)) { webModuleData.setAttribute("authenticator", new BasicAuthenticator()); } else if ("DIGEST".equals(authMethod)) { webModuleData.setAttribute("authenticator", new DigestAuthenticator());
authenticator=_formAuthenticator=new FormAuthenticator(); else if(Constraint.__BASIC_AUTH.equals(m)) authenticator=new BasicAuthenticator(); else if(Constraint.__DIGEST_AUTH.equals(m)) authenticator=new DigestAuthenticator();