Remove ClientRegistrationRepository.findByClientId()

Fixes gh-4583
This commit is contained in:
Joe Grandja 2017-09-28 09:01:58 -04:00
parent 52f495a5ec
commit d191bcc8ac
2 changed files with 0 additions and 13 deletions

View File

@ -15,8 +15,6 @@
*/ */
package org.springframework.security.oauth2.client.registration; package org.springframework.security.oauth2.client.registration;
import java.util.List;
/** /**
* A repository for OAuth 2.0 / OpenID Connect 1.0 {@link ClientRegistration}'s. * A repository for OAuth 2.0 / OpenID Connect 1.0 {@link ClientRegistration}'s.
* *
@ -33,8 +31,6 @@ import java.util.List;
*/ */
public interface ClientRegistrationRepository { public interface ClientRegistrationRepository {
List<ClientRegistration> findByClientId(String clientId);
ClientRegistration findByRegistrationId(String registrationId); ClientRegistration findByRegistrationId(String registrationId);
} }

View File

@ -21,7 +21,6 @@ import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* A {@link ClientRegistrationRepository} that stores {@link ClientRegistration}(s) <i>in-memory</i>. * A {@link ClientRegistrationRepository} that stores {@link ClientRegistration}(s) <i>in-memory</i>.
@ -47,14 +46,6 @@ public final class InMemoryClientRegistrationRepository implements ClientRegistr
this.registrations = Collections.unmodifiableMap(registrationsMap); this.registrations = Collections.unmodifiableMap(registrationsMap);
} }
@Override
public List<ClientRegistration> findByClientId(String clientId) {
Assert.hasText(clientId, "clientId cannot be empty");
return this.registrations.values().stream()
.filter(registration -> registration.getClientId().equals(clientId))
.collect(Collectors.toList());
}
@Override @Override
public ClientRegistration findByRegistrationId(String registrationId) { public ClientRegistration findByRegistrationId(String registrationId) {
Assert.hasText(registrationId, "registrationId cannot be empty"); Assert.hasText(registrationId, "registrationId cannot be empty");