Search in sources :

Example 6 with RememberMeException

use of org.craftercms.security.exception.rememberme.RememberMeException in project profile by craftercms.

the class RememberMeManagerImpl method disableRememberMe.

protected void disableRememberMe(String loginId, RequestContext context) throws RememberMeException {
    deleteRememberMeCookie(context.getResponse());
    try {
        authenticationService.deletePersistentLogin(loginId);
    } catch (ProfileException e) {
        throw new RememberMeException("Error invalidating persistent login '" + loginId + "'");
    }
    logger.debug("Persistent login '{}' invalidated", loginId);
}
Also used : ProfileException(org.craftercms.profile.api.exceptions.ProfileException) RememberMeException(org.craftercms.security.exception.rememberme.RememberMeException)

Aggregations

RememberMeException (org.craftercms.security.exception.rememberme.RememberMeException)6 PersistentLogin (org.craftercms.profile.api.PersistentLogin)4 ProfileException (org.craftercms.profile.api.exceptions.ProfileException)4 CryptoException (org.craftercms.commons.crypto.CryptoException)2 InvalidCookieException (org.craftercms.security.exception.rememberme.InvalidCookieException)2 Authentication (org.craftercms.security.authentication.Authentication)1 AuthenticationException (org.craftercms.security.exception.AuthenticationException)1 CookieTheftException (org.craftercms.security.exception.rememberme.CookieTheftException)1