use of org.simbasecurity.client.interceptor.SimbaWSAuthenticationException in project simba-os by cegeka.
the class BasicAuthenticationFilter method sendRequestAndContinueChain.
private void sendRequestAndContinueChain(RequestData requestData, FilterActionFactory actionFactory) {
try (THttpClient tHttpClient = new THttpClient(SimbaConfiguration.getSimbaAuthenticationURL())) {
TProtocol tProtocol = new TJSONProtocol(tHttpClient);
AuthenticationFilterService.Client authenticationClient = new AuthenticationFilterService.Client(tProtocol);
ActionDescriptor actionDescriptor = authenticationClient.processRequest(requestData, this.authenticationChainName);
setPrincipalAndContinueChain(actionFactory, actionDescriptor);
if (!actionDescriptor.getActionTypes().contains(ActionType.DO_FILTER_AND_SET_PRINCIPAL) && !actionDescriptor.getActionTypes().contains(ActionType.REDIRECT)) {
throw new SimbaWSAuthenticationException("Authentication Failed");
}
} catch (Exception exception) {
throw new SimbaWSAuthenticationException("Authentication Failed");
}
}
Aggregations