Package org.apache.isis.runtimes.dflt.runtime.fixtures.authentication

Examples of org.apache.isis.runtimes.dflt.runtime.fixtures.authentication.AuthenticationRequestLogonFixture


        }

        final boolean loggedInUsingLogonFixture = httpSession.getAttribute(WebAppConstants.HTTP_SESSION_LOGGED_ON_PREVIOUSLY_USING_LOGON_FIXTURE_KEY) != null;
        if (logonFixture != null && !loggedInUsingLogonFixture) {
            httpSession.setAttribute(WebAppConstants.HTTP_SESSION_LOGGED_ON_PREVIOUSLY_USING_LOGON_FIXTURE_KEY, true);
            return authenticationManager.authenticate(new AuthenticationRequestLogonFixture(logonFixture));
        }

        return null;
    }
View Full Code Here


    }

    private void switchUser(final LogonFixture logonFixture) {
        getTransactionManager().endTransaction();
        IsisContext.closeSession();
        final AuthenticationRequestLogonFixture authRequest = new AuthenticationRequestLogonFixture(logonFixture);
        final AuthenticationSession session = getAuthenticationManager().authenticate(authRequest);
        IsisContext.openSession(session);
        getTransactionManager().startTransaction();
    }
View Full Code Here

            // specific to this bootstrap mechanism
            AuthenticationRequest request;
            final LogonFixture logonFixture = system.getFixturesInstaller().getLogonFixture();
            if (logonFixture != null) {
                request = new AuthenticationRequestLogonFixture(logonFixture);
            } else {
                request = new AuthenticationRequestExploration(logonFixture);
            }
            session = IsisContext.getAuthenticationManager().authenticate(request);
View Full Code Here

    @Before
    public void setUp() {
        mockConfiguration = mockery.mock(IsisConfiguration.class);

        logonFixtureRequest = new AuthenticationRequestLogonFixture(new LogonFixture("joebloggs"));
        someOtherRequest = new SomeOtherAuthenticationRequest();
        authenticator = new LogonFixtureAuthenticator(mockConfiguration);
    }
View Full Code Here

        // logon fixture provided
        if (request == null) {
            if (getLogonFixture() != null && !loggedInUsingLogonFixture) {
                loggedInUsingLogonFixture = true;
                request = new AuthenticationRequestLogonFixture(getLogonFixture());
            }
        }
        return request;
    }
View Full Code Here

    }

    public void openSession(final String userName, final List<String> roles) {
        IsisContext.closeSession();
        final LogonFixture logonFixture = new LogonFixture(userName, roles);
        final AuthenticationRequestLogonFixture authRequest = new AuthenticationRequestLogonFixture(logonFixture);
        final AuthenticationSession authSession = getAuthenticationManager().authenticate(authRequest);

        IsisContext.openSession(authSession);
    }
View Full Code Here

        // logon fixture provided
        if (request == null) {
            if (getLogonFixture() != null && !loggedInUsingLogonFixture) {
                loggedInUsingLogonFixture = true;
                request = new AuthenticationRequestLogonFixture(getLogonFixture());
            }
        }
        return request;
    }
View Full Code Here

        final boolean loggedInUsingLogonFixture =
            httpSession.getAttribute(WebAppConstants.HTTP_SESSION_LOGGED_ON_PREVIOUSLY_USING_LOGON_FIXTURE_KEY) != null;
        if (logonFixture != null && !loggedInUsingLogonFixture) {
            httpSession.setAttribute(WebAppConstants.HTTP_SESSION_LOGGED_ON_PREVIOUSLY_USING_LOGON_FIXTURE_KEY, true);
            return getAuthenticationManager().authenticate(new AuthenticationRequestLogonFixture(logonFixture));
        }
       
        return null;
    }
View Full Code Here

            // specific to this bootstrap mechanism
            AuthenticationRequest request;
            final LogonFixture logonFixture = system.getFixturesInstaller().getLogonFixture();
            if (logonFixture != null) {
                request = new AuthenticationRequestLogonFixture(logonFixture);
            } else {
                request = new AuthenticationRequestExploration(logonFixture);
            }
            session = IsisContext.getAuthenticationManager().authenticate(request);
View Full Code Here

    @Before
    public void setUp() {
        mockConfiguration = mockery.mock(IsisConfiguration.class);

        logonFixtureRequest = new AuthenticationRequestLogonFixture(new LogonFixture("joebloggs"));
        someOtherRequest = new SomeOtherAuthenticationRequest();
        authenticator = new LogonFixtureAuthenticator(mockConfiguration);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.fixtures.authentication.AuthenticationRequestLogonFixture

Copyright © 2018 www.massapicom. 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.