Add clientID parameter to the IAuthenticator interface (breaks compatibility).
This commit is contained in:
@@ -6,7 +6,7 @@ import io.moquette.spi.security.IAuthenticator;
|
||||
* Created by andrea on 8/23/14.
|
||||
*/
|
||||
public class AcceptAllAuthenticator implements IAuthenticator {
|
||||
public boolean checkValid(String username, byte[] password) {
|
||||
public boolean checkValid(String clientId, String username, byte[] password) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class DBAuthenticator implements IAuthenticator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean checkValid(String username, byte[] password) {
|
||||
public synchronized boolean checkValid(String clientId, String username, byte[] password) {
|
||||
// Check Username / Password in DB using sqlQuery
|
||||
if (username == null || password == null) {
|
||||
LOG.info("username or password was null");
|
||||
|
||||
@@ -106,8 +106,9 @@ public class FileAuthenticator implements IAuthenticator {
|
||||
throw new ParseException("Failed to read", 1);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean checkValid(String username, byte[] password) {
|
||||
|
||||
@Override
|
||||
public boolean checkValid(String clientId, String username, byte[] password) {
|
||||
if (username == null || password == null) {
|
||||
LOG.info("username or password was null");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user