public AuthenticationRequestLogonFixture(final String name, final List<String> roles) { super(name); setRoles(roles); }
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); }
if (logonFixture != null && !loggedInUsingLogonFixture) { httpSession.setAttribute(WebAppConstants.HTTP_SESSION_LOGGED_ON_PREVIOUSLY_USING_LOGON_FIXTURE_KEY, true); return authenticationManager.authenticate(new AuthenticationRequestLogonFixture(logonFixture));
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(); }
@Before public void setUp() { mockConfiguration = mockery.mock(IsisConfiguration.class); logonFixtureRequest = new AuthenticationRequestLogonFixture(new LogonFixture("joebloggs")); someOtherRequest = new SomeOtherAuthenticationRequest(); authenticator = new LogonFixtureAuthenticator(mockConfiguration); }
final LogonFixture logonFixture = system.getFixturesInstaller().getLogonFixture(); if (logonFixture != null) { request = new AuthenticationRequestLogonFixture(logonFixture); } else { request = new AuthenticationRequestExploration(logonFixture);