Merge pull request #875 from mposolda/master
Allow login modules to be more flexible
This commit is contained in:
commit
3e8495f435
2 changed files with 1 additions and 9 deletions
|
@ -16,11 +16,7 @@ public class BearerTokenLoginModule extends AbstractKeycloakLoginModule {
|
|||
|
||||
@Override
|
||||
protected Auth doAuth(String username, String password) throws VerificationException {
|
||||
if (!"Bearer".equalsIgnoreCase(username)) {
|
||||
log.debug("Username is expected to be bearer but is " + username + ". Ignoring login module");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Should do some checking of authenticated username if it's equivalent to passed value?
|
||||
return bearerAuth(password);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,6 @@ public class DirectAccessGrantsLoginModule extends AbstractKeycloakLoginModule {
|
|||
|
||||
@Override
|
||||
protected Auth doAuth(String username, String password) throws IOException, VerificationException {
|
||||
if ("Bearer".equalsIgnoreCase(username)) {
|
||||
log.debug("Username is not expected to be bearer for this login module. Ignoring login module");
|
||||
return null;
|
||||
}
|
||||
return directGrantAuth(username, password);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue