Refactored 'getClientByRegistrationId'

This commit is contained in:
vzikratyi 2020-06-19 16:36:22 +03:00
parent d5abe337be
commit a4a05fcf30

View File

@ -68,15 +68,6 @@ public class OAuth2Configuration {
} }
public OAuth2Client getClientByRegistrationId(String registrationId) { public OAuth2Client getClientByRegistrationId(String registrationId) {
OAuth2Client result = null; return clients != null ? clients.get(registrationId) : null;
if (clients != null && !clients.isEmpty()) {
for (String key : clients.keySet()) {
if (key.equals(registrationId)) {
result = clients.get(key);
break;
}
}
}
return result;
} }
} }