List of usage examples for org.springframework.security.web.authentication.preauth PreAuthenticatedCredentialsNotFoundException PreAuthenticatedCredentialsNotFoundException
public PreAuthenticatedCredentialsNotFoundException(String msg)
From source file:org.appverse.web.framework.backend.api.helpers.security.SessionAttributePreAuthenticatedProcessingFilter.java
@Override protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) { HttpSession httpSession = request.getSession(false); if (httpSession == null) { throw new PreAuthenticatedCredentialsNotFoundException( principalSessionAttribute + " attribute not found in session."); }//from w w w . ja v a 2 s . c o m String principal = (String) httpSession.getAttribute(principalSessionAttribute); if (principal == null) { throw new PreAuthenticatedCredentialsNotFoundException( principalSessionAttribute + " attribute not found in session."); } return principal; }