NIHVIVO-2694 Make sure that the BasicAuthenticator and the AuthenticatorStub comply to the contract on throwing LoginNotPermitted exceptions.
This commit is contained in:
parent
19f9e10ffb
commit
78c19dde80
3 changed files with 12 additions and 2 deletions
|
@ -137,7 +137,11 @@ public class AuthenticatorStub extends Authenticator {
|
|||
|
||||
@Override
|
||||
public void recordLoginAgainstUserAccount(UserAccount userAccount,
|
||||
AuthenticationSource authSource) {
|
||||
AuthenticationSource authSource) throws LoginNotPermitted {
|
||||
if (!isUserPermittedToLogin(userAccount)) {
|
||||
throw new LoginNotPermitted();
|
||||
}
|
||||
|
||||
recordedLogins.add(userAccount.getEmailAddress());
|
||||
|
||||
LoginStatusBean lsb = new LoginStatusBean(userAccount.getUri(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue