// passing userDetails and cookieTokens
// so this class doesn't have to know about ExtendedUserDetails
// interface. Only needed if some other UserDetails service is created.
// if not expired load user details
ExtendedUserDetails userDetails = (ExtendedUserDetails)
(getUserDetailsService().loadUserByUsername(cookieTokens[0]));
//if no persistentLogin info returned from UserDetailsService, abort
//as cookie was misleading or manually invalidated.
PersistentLogin login = userDetails.getPersistentLogin();
if (login == null)
{
throw new InvalidCookieException(
"No PersistentLogin record in repository");