Search in sources :

Example 1 with RequestActionFactory

use of org.simbasecurity.common.filter.action.RequestActionFactory in project simba-os by cegeka.

the class LoginController method handleRequest.

@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
    RequestData requestData = RequestUtil.createRequestData(request, resolveSimbaWebURL(request));
    AuthenticationFilterService.Iface authenticationFilterService = GlobalContext.locate(AuthenticationFilterService.Iface.class, "authenticationFilterService");
    ActionDescriptor actionDescriptor = authenticationFilterService.processRequest(requestData, "credentialChain");
    if (actionDescriptor.getSsoToken() != null) {
        makeSimbaSSOCookieForCORS(response, actionDescriptor);
    }
    RequestActionFactory actionFactory = new RequestActionFactory(request, response);
    actionFactory.execute(actionDescriptor);
    return null;
}
Also used : AuthenticationFilterService(org.simbasecurity.api.service.thrift.AuthenticationFilterService) RequestData(org.simbasecurity.api.service.thrift.RequestData) ActionDescriptor(org.simbasecurity.api.service.thrift.ActionDescriptor) RequestActionFactory(org.simbasecurity.common.filter.action.RequestActionFactory)

Example 2 with RequestActionFactory

use of org.simbasecurity.common.filter.action.RequestActionFactory in project simba-os by cegeka.

the class ChangePasswordController method handleRequest.

public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
    RequestData requestData = RequestUtil.createRequestData(request, resolveSimbaWebURL(request));
    ChainContextImpl context = new ChainContextImpl(requestData, sessionService.getSession(requestData.getSsoToken()), configurationService, loginMappingService);
    credentialChain.execute(context);
    ActionDescriptor actionDescriptor = context.getActionDescriptor();
    RequestActionFactory actionFactory = new RequestActionFactory(request, response);
    actionFactory.execute(actionDescriptor);
    return null;
}
Also used : ChainContextImpl(org.simbasecurity.core.chain.ChainContextImpl) RequestData(org.simbasecurity.api.service.thrift.RequestData) ActionDescriptor(org.simbasecurity.api.service.thrift.ActionDescriptor) RequestActionFactory(org.simbasecurity.common.filter.action.RequestActionFactory)

Aggregations

ActionDescriptor (org.simbasecurity.api.service.thrift.ActionDescriptor)2 RequestData (org.simbasecurity.api.service.thrift.RequestData)2 RequestActionFactory (org.simbasecurity.common.filter.action.RequestActionFactory)2 AuthenticationFilterService (org.simbasecurity.api.service.thrift.AuthenticationFilterService)1 ChainContextImpl (org.simbasecurity.core.chain.ChainContextImpl)1