Examples of FormAuthenticator


Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

        } else if (authMethod == BuiltInAuthMethod.DIGEST) {
            authenticator = new DigestAuthenticator();
        } else if (authMethod == BuiltInAuthMethod.CLIENTCERT) {
            authenticator = new ClientCertAuthenticator();
        } else if (authMethod == BuiltInAuthMethod.FORM) {
            authenticator = new FormAuthenticator(loginPage, errorPage, true);
        } else if (authMethod == BuiltInAuthMethod.NONE) {
            authenticator = new NoneAuthenticator();
        } else {
            throw new IllegalStateException("someone added a new BuiltInAuthMethod without telling us");
        }
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

    protected WebAppContextWrapper setUpSecureAppContext(String securityRealmName, Map<String, SubjectInfo> roleDesignates, Map<Principal, Set<String>> principalRoleMap, ComponentPermissions componentPermissions, SubjectInfo defaultSubjectInfo, PermissionCollection checked, Set securityRoles) throws Exception {
        String policyContextId = "TEST";
        ApplicationPolicyConfigurationManager jacc = setUpJACC(roleDesignates, principalRoleMap, componentPermissions, policyContextId);
        LoginService loginService = newLoginService();
//        Authenticator serverAuthentication = new FormAuthenticator("/auth/logon.html?param=test", "/auth/logonError.html?param=test", true);
        Authenticator serverAuthentication = new FormAuthenticator("/auth/logon.html?param=test", "/auth/logonError.html?param=test", true);
        SecurityHandlerFactory securityHandlerFactory = new ServerAuthenticationGBean(serverAuthentication, loginService);
        return setUpAppContext(
                securityRealmName,
                securityHandlerFactory,
                policyContextId,
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

        } else if (authMethod == BuiltInAuthMethod.CLIENTCERT) {
            authenticator = new ClientCertAuthenticator();
        } else if (authMethod == BuiltInAuthMethod.FORM) {
            boolean dispatch = true;
//            authenticator = new FormAuthenticator(loginPage, errorPage, dispatch);
            authenticator = new FormAuthenticator(loginPage, errorPage, true);
        } else if (authMethod == BuiltInAuthMethod.NONE) {
            authenticator = new NoneAuthenticator();
        } else {
            throw new IllegalStateException("someone added a new BuiltInAuthMethod without telling us");
        }
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

    Authenticator authenticator = webappContext.getSecurityHandler().getAuthenticator();

    if (authenticator instanceof FormAuthenticator)
    {
      FormAuthenticator formAuthenticator = (FormAuthenticator) authenticator;
      formAuthenticator.setAlwaysSaveUri(true);
    }
    return webappContext;
  }
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

        if (auth==null || Constraint.__BASIC_AUTH.equalsIgnoreCase(auth))
            authenticator=new BasicAuthenticator();
        else if (Constraint.__DIGEST_AUTH.equalsIgnoreCase(auth))
            authenticator=new DigestAuthenticator();
        else if (Constraint.__FORM_AUTH.equalsIgnoreCase(auth))
            authenticator=new FormAuthenticator();
        else if ( Constraint.__SPNEGO_AUTH.equalsIgnoreCase(auth) )
            authenticator = new SpnegoAuthenticator();
        else if ( Constraint.__NEGOTIATE_AUTH.equalsIgnoreCase(auth) ) // see Bug #377076
            authenticator = new SpnegoAuthenticator(Constraint.__NEGOTIATE_AUTH);
        if (Constraint.__CERT_AUTH.equalsIgnoreCase(auth)||Constraint.__CERT_AUTH2.equalsIgnoreCase(auth))
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator


    @Test
    public void testFormDispatch() throws Exception
    {
        _security.setAuthenticator(new FormAuthenticator("/testLoginPage","/testErrorPage",true));
        _server.start();

        String response;

        response = _connector.getResponses("GET /ctx/noauth/info HTTP/1.0\r\n\r\n");
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

    }

    @Test
    public void testFormRedirect() throws Exception
    {
        _security.setAuthenticator(new FormAuthenticator("/testLoginPage","/testErrorPage",false));
        _server.start();

        String response;

        response = _connector.getResponses("GET /ctx/noauth/info HTTP/1.0\r\n\r\n");
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

    }

    @Test
    public void testFormPostRedirect() throws Exception
    {
        _security.setAuthenticator(new FormAuthenticator("/testLoginPage","/testErrorPage",false));
        _server.start();

        String response;

        response = _connector.getResponses("GET /ctx/noauth/info HTTP/1.0\r\n\r\n");
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

    }

    @Test
    public void testFormNoCookies() throws Exception
    {
        _security.setAuthenticator(new FormAuthenticator("/testLoginPage","/testErrorPage",false));
        _server.start();

        String response;

        response = _connector.getResponses("GET /ctx/noauth/info HTTP/1.0\r\n\r\n");
View Full Code Here

Examples of org.eclipse.jetty.security.authentication.FormAuthenticator

    @Test
    public void testStrictFormDispatch()
            throws Exception
    {
        _security.setAuthenticator(new FormAuthenticator("/testLoginPage","/testErrorPage",true));
        _server.start();

        String response;

        response = _connector.getResponses("GET /ctx/noauth/info HTTP/1.0\r\n\r\n");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.