Commit c690ddd4 authored by Matija Obreza's avatar Matija Obreza

Throw LockedException in AccountLockoutManager

parent 32191fc8
...@@ -29,6 +29,7 @@ import org.genesys.blocks.security.service.BasicUserService; ...@@ -29,6 +29,7 @@ import org.genesys.blocks.security.service.BasicUserService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.LockedException;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
...@@ -132,6 +133,7 @@ public class AccountLockoutManager { ...@@ -132,6 +133,7 @@ public class AccountLockoutManager {
} catch (final NoUserFoundException e) { } catch (final NoUserFoundException e) {
LOG.warn(e.getMessage()); LOG.warn(e.getMessage());
} }
throw new LockedException("Too many failed login attempts.");
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment