Search in sources :

Example 1 with ChainImpl

use of org.simbasecurity.core.chain.ChainImpl in project simba-os by cegeka.

the class AuthenticationFilterServiceImplTest method testProcessRequest.

@Test
public void testProcessRequest() throws Exception {
    Session sessionMock = mock(Session.class);
    when(sessionServiceMock.getSession(any(SSOToken.class))).thenReturn(sessionMock);
    ChainImpl authenticationChainMock = mock(ChainImpl.class);
    when(applicationContext.getBean("authenticationChain")).thenReturn(authenticationChainMock);
    serviceImpl.processRequest(new RequestData(null, null, null, null, null, null, false, false, false, false, false, null, null, "loginToken", null), "authenticationChain");
    verify(authenticationChainMock).execute(any(ChainContext.class));
}
Also used : SSOToken(org.simbasecurity.api.service.thrift.SSOToken) ChainContext(org.simbasecurity.core.chain.ChainContext) RequestData(org.simbasecurity.api.service.thrift.RequestData) ChainImpl(org.simbasecurity.core.chain.ChainImpl) Session(org.simbasecurity.core.domain.Session) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 RequestData (org.simbasecurity.api.service.thrift.RequestData)1 SSOToken (org.simbasecurity.api.service.thrift.SSOToken)1 ChainContext (org.simbasecurity.core.chain.ChainContext)1 ChainImpl (org.simbasecurity.core.chain.ChainImpl)1 Session (org.simbasecurity.core.domain.Session)1