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

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


            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

                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

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

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

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

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

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

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

        Assert.assertEquals("xxx", session.getValidationCode());
    }
View Full Code Here

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

        Assert.assertEquals(0, session.getRoles().size());
    }
View Full Code Here

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

        assertThat(authSession, is(MultiUserExplorationSession.class));

        assertThat(authSession.getUserName(), is(equalTo("fred")));
    }
View Full Code Here

                allowing(mockConfiguration).getString(ExplorationAuthenticatorConstants.USERS);
                will(returnValue("sven"));
            }
        });
        authenticator = new ExplorationAuthenticator(mockConfiguration);
        final AuthenticationSession authSession = authenticator.authenticate(new AuthenticationRequestExploration(), "");
        assertThat(authSession, is(SimpleSession.class));

        assertThat(authSession.getUserName(), is(equalTo("sven")));
    }
View Full Code Here

                will(returnValue(null));
            }
        });
        authenticator = new ExplorationAuthenticator(mockConfiguration);

        final AuthenticationSession authSession = authenticator.authenticate(new AuthenticationRequestExploration(), "");
        assertThat(authSession, is(ExplorationSession.class));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.authentication.exploration.AuthenticationRequestExploration

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.