use of org.simbasecurity.client.filter.request.HttpServletRequestWithPrincipal in project simba-os by cegeka.
the class DoFilterAndSetPrincipalAction method execute.
@Override
public void execute() throws ServletException, IOException {
String username = getActionDescriptor().getPrincipal();
Principal principal = null;
if (username != null) {
principal = new UserPrincipal(username);
}
if (principal != null) {
request = new HttpServletRequestWithPrincipal(request, principal);
}
if (doFilterExtension != null)
doFilterExtension.before();
try {
filterChain.doFilter(request, response);
} finally {
if (doFilterExtension != null)
doFilterExtension.after();
}
}
Aggregations