ant format seems to have reformated these differently than what is in CVS
This commit is contained in:
@@ -25,12 +25,12 @@ import java.util.Vector;
|
||||
|
||||
/**
|
||||
* Backend business object that manages the contacts.
|
||||
*
|
||||
*
|
||||
* <P>
|
||||
* As a backend, it never faces the public callers. It is always accessed via
|
||||
* the {@link ContactManagerFacade}.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* <P>
|
||||
* This facade approach is not really necessary in this application, and is
|
||||
* done simply to demonstrate granting additional authorities via the
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
package sample.contact;
|
||||
|
||||
import net.sf.acegisecurity.Authentication;
|
||||
import net.sf.acegisecurity.GrantedAuthority;
|
||||
import net.sf.acegisecurity.AuthenticationCredentialsNotFoundException;
|
||||
import net.sf.acegisecurity.GrantedAuthority;
|
||||
import net.sf.acegisecurity.context.ContextHolder;
|
||||
import net.sf.acegisecurity.context.SecureContext;
|
||||
|
||||
@@ -67,10 +67,11 @@ public class SecureIndexController implements Controller, InitializingBean {
|
||||
public ModelAndView handleRequest(HttpServletRequest request,
|
||||
HttpServletResponse response) throws ServletException, IOException {
|
||||
SecureContext secureContext = ((SecureContext) ContextHolder.getContext());
|
||||
|
||||
if (null == secureContext) {
|
||||
throw new AuthenticationCredentialsNotFoundException(
|
||||
"Authentication credentials were not found in the " +
|
||||
"SecureContext");
|
||||
"Authentication credentials were not found in the "
|
||||
+ "SecureContext");
|
||||
}
|
||||
|
||||
final Authentication currentUser = secureContext.getAuthentication();
|
||||
|
||||
Reference in New Issue
Block a user