how apache shiro remember me works code example

Example 1: how apache shiro remember me works

try {
    currentUser.login(token);
} catch  ( UnknownAccountException uae ) { ...
} catch  ( IncorrectCredentialsException ice ) { ...
} catch  ( LockedAccountException lae ) { ...
} catch  ( ExcessiveAttemptsException eae ) { ...
} ...  your own ...
} catch ( AuthenticationException ae ) {
    //unexpected error?
}
//No problems, show authenticated view…

Example 2: how apache shiro remember me works

currentUser.logout(); //removes all identifying information and invalidates their session too.

Tags:

Misc Example