Package org.apache.isis.core.runtime.authentication

Examples of org.apache.isis.core.runtime.authentication.AuthenticationManager


        stubRequest = context.fixture(Fixture_Request_Stub.class).object();
    }

    @Test
    public void delegatesToAuthenticationManagerAndCachesAuthSessionIfOk() {
        final AuthenticationManager mockAuthMgr =
            context.fixture(Fixture_AuthenticationManager_AuthenticateOk.class).object();
        webSession = new AuthenticatedWebSessionForIsis(stubRequest) {
            private static final long serialVersionUID = 1L;

            @Override
View Full Code Here


        assertThat(webSession.getAuthenticationSession(), is(not(nullValue())));
    }

    @Test
    public void delegatesToAuthenticationManagerAndHandlesIfNotAuthenticated() {
        final AuthenticationManager mockAuthMgr = context.mock(AuthenticationManager.class);
        context.checking(new Expectations() {
            {
                one(mockAuthMgr).authenticate(with(any(AuthenticationRequest.class)));
                will(returnValue(null));
            }
View Full Code Here

    @Override
    public void setUp(final MockFixture.Context fixtureContext) {
        final FixtureMockery mockery = fixtureContext.getMockery();

        final AuthenticationManager mockAuthMgr =
            mockery.fixture(Fixture_AuthenticationManager_AuthenticateOk.class).object();
        final Request stubRequest = mockery.fixture(Fixture_Request_Stub.class).object();

        webSession = new AuthenticatedWebSessionForIsis(stubRequest) {
            private static final long serialVersionUID = 1L;
View Full Code Here

        stubRequest = context.fixture(Fixture_Request_Stub.class).object();
    }

    @Test
    public void signInJustDelegatesToAuthenticateAndSavesState() {
        final AuthenticationManager mockAuthMgr =
            context.fixture(Fixture_AuthenticationManager_AuthenticateOk.class).object();
        webSession = new AuthenticatedWebSessionForIsis(stubRequest) {
            private static final long serialVersionUID = 1L;

            @Override
View Full Code Here

    // Wicket Hooks
    // /////////////////////////////////////////////////

    @Override
    public Session newSession(final Request request, final Response response) {
        final AuthenticationManager authenticationManager = anonymousAuthenticationManager();

        final AnonymousWebSessionForIsis anonymousWebSession = new AnonymousWebSessionForIsis(request, authenticationManager);
        anonymousWebSession.authenticate(null, null);
        return anonymousWebSession;
    }
View Full Code Here

            isisSystem = createIsisSystem(services);
            isisSystem.init();
            IsisContext.closeSession();
        }

        final AuthenticationManager authenticationManager = isisSystem.getSessionFactory().getAuthenticationManager();
        authenticationSession = authenticationManager.authenticate(authenticationRequest);

        IsisContext.openSession(authenticationSession);
        setContainer(getContainer());
       
        wireAndInstallFixtures();
View Full Code Here

     * method}.
     */
    protected final IsisSessionFactory createSessionFactory(final DeploymentType deploymentType, final UserProfileLoader userProfileLoader, final PersistenceSessionFactory persistenceSessionFactory) throws IsisSystemException {

        final IsisConfiguration configuration = getConfiguration();
        final AuthenticationManager authenticationManager = obtainAuthenticationManager(deploymentType);
        final AuthorizationManager authorizationManager = obtainAuthorizationManager(deploymentType);
        final TemplateImageLoader templateImageLoader = obtainTemplateImageLoader();
        final OidMarshaller oidMarshaller = obtainOidMarshaller();
       
        final Collection<MetaModelRefiner> metaModelRefiners = refiners(authenticationManager, authorizationManager, templateImageLoader, persistenceSessionFactory);
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.authentication.AuthenticationManager

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.