merge
This commit is contained in:
parent
14dc0ff92f
commit
5a86623c88
2 changed files with 3 additions and 3 deletions
|
@ -62,8 +62,8 @@ public class LDAPMappersComparator {
|
||||||
@Override
|
@Override
|
||||||
public int compare(ComponentModel o1, ComponentModel o2) {
|
public int compare(ComponentModel o1, ComponentModel o2) {
|
||||||
// UserAttributeLDAPFederationMapper first
|
// UserAttributeLDAPFederationMapper first
|
||||||
boolean isO1AttrMapper = o1.getProviderType().equals(UserAttributeLDAPStorageMapperFactory.PROVIDER_ID);
|
boolean isO1AttrMapper = o1.getProviderId().equals(UserAttributeLDAPStorageMapperFactory.PROVIDER_ID);
|
||||||
boolean isO2AttrMapper = o2.getProviderType().equals(UserAttributeLDAPStorageMapperFactory.PROVIDER_ID);
|
boolean isO2AttrMapper = o2.getProviderId().equals(UserAttributeLDAPStorageMapperFactory.PROVIDER_ID);
|
||||||
if (!isO1AttrMapper) {
|
if (!isO1AttrMapper) {
|
||||||
if (isO2AttrMapper) {
|
if (isO2AttrMapper) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -230,7 +230,7 @@ public class OTPCredentialProvider implements CredentialProvider, CredentialInpu
|
||||||
} else {
|
} else {
|
||||||
TimeBasedOTP validator = new TimeBasedOTP(policy.getAlgorithm(), policy.getDigits(), policy.getPeriod(), policy.getLookAheadWindow());
|
TimeBasedOTP validator = new TimeBasedOTP(policy.getAlgorithm(), policy.getDigits(), policy.getPeriod(), policy.getLookAheadWindow());
|
||||||
List<CredentialModel> creds = getCachedCredentials(user, CredentialModel.TOTP);
|
List<CredentialModel> creds = getCachedCredentials(user, CredentialModel.TOTP);
|
||||||
if (creds.isEmpty()) {
|
if (creds == null) {
|
||||||
creds = getCredentialStore().getStoredCredentialsByType(realm, user, CredentialModel.TOTP);
|
creds = getCredentialStore().getStoredCredentialsByType(realm, user, CredentialModel.TOTP);
|
||||||
} else {
|
} else {
|
||||||
logger.debugv("Cache hit for TOTP for user {0}", user.getUsername());
|
logger.debugv("Cache hit for TOTP for user {0}", user.getUsername());
|
||||||
|
|
Loading…
Reference in a new issue