Examples of AuthenticationRequestExploration


Examples of org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration

                allowing(mockConfiguration).getString(ExplorationAuthenticatorConstants.USERS);
                will(returnValue("fred, sven:admin|sales|marketing, bob:sales, dick"));
            }
        });
        authenticator = new ExplorationAuthenticator(mockConfiguration);
        this.session = (MultiUserExplorationSession) authenticator.authenticate(new AuthenticationRequestExploration(), "");

        session.setCurrentSession("bob");
        Assert.assertEquals("bob", session.getUserName());
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration

                allowing(mockConfiguration).getString(ExplorationAuthenticatorConstants.USERS);
                will(returnValue("fred, sven:admin|sales|marketing, bob:sales, dick"));
            }
        });
        authenticator = new ExplorationAuthenticator(mockConfiguration);
        this.session = (MultiUserExplorationSession) authenticator.authenticate(new AuthenticationRequestExploration(), "");

        session.setCurrentSession("sven");
        final List<String> roles = session.getRoles();
        Assert.assertEquals(3, roles.size());
        Assert.assertEquals("admin", roles.get(0));
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration

        ;

        // exploration & (optionally) logon fixture provided
        if (request == null) {
            if (getDeploymentType().isExploring()) {
                request = new AuthenticationRequestExploration(getLogonFixture());
            }
        }

        // logon fixture provided
        if (request == null) {
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration

                allowing(mockConfiguration).getString(ExplorationAuthenticatorConstants.USERS);
                will(returnValue(DeploymentType.UNIT_TESTING.name()));
            }
        });

        explorationRequest = new AuthenticationRequestExploration();
        someOtherRequest = new SomeOtherAuthenticationRequest();

        authenticator = new ExplorationAuthenticator(mockConfiguration);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration

            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);

            IsisContext.openSession(session);
            getTransactionManager().startTransaction();
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration

    }

    protected AuthenticationSession authenticate(final String user, final String password) {
        AuthenticationRequest request;
        if (getDeploymentType() == DeploymentType.EXPLORATION) {
            request = new AuthenticationRequestExploration();
        } else {
            request = new AuthenticationRequestPassword(user, password);
        }
        return getAuthenticationManager().authenticate(request);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration

        if (session != null) {
            return session;
        }

        // will always succeed.
        final AuthenticationRequestExploration request = new AuthenticationRequestExploration();
        return IsisContext.getAuthenticationManager().authenticate(request);
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.authentication.exploration.AuthenticationRequestExploration

        }
        final LogonFixture logonFixture = system.getLogonFixture();

        // see if exploration is supported
        if (system.getDeploymentType().isExploring()) {
            authSession = authenticationManager.authenticate(new AuthenticationRequestExploration(logonFixture));
            if (authSession != null) {
                return authSession;
            }
        }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.authentication.exploration.AuthenticationRequestExploration

            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);

            IsisContext.openSession(session);
            getTransactionManager().startTransaction();
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.authentication.exploration.AuthenticationRequestExploration

                allowing(mockConfiguration).getString(ExplorationAuthenticatorConstants.USERS);
                will(returnValue("fred, sven:admin|sales|marketing, bob:sales, dick"));
            }
        });
        authenticator = new ExplorationAuthenticator(mockConfiguration);
        this.session = (MultiUserExplorationSession) authenticator.authenticate(new AuthenticationRequestExploration(), "");

        session.setCurrentSession("sven");
        final List<String> roles = session.getRoles();
        Assert.assertEquals(3, roles.size());
        Assert.assertEquals("admin", roles.get(0));
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.