- final OsAuthenticationToken oat;
- // if (authentication instanceof UsernamePasswordAuthenticationToken) {
- // Subject subject = Subject.getSubject(AccessController.getContext());
- // if (subject == null)
- // return null;
- // oat = new OsAuthenticationToken();
- // } else
- if (authentication instanceof OsAuthenticationToken) {
- oat = (OsAuthenticationToken) authentication;
- } else {
- return null;
- }
-
- // not OS authenticated
-// if (oat.getUser() == null)
-// return null;