Class CachingRelyingPartyRegistrationRepository
java.lang.Object
org.springframework.security.saml2.provider.service.registration.CachingRelyingPartyRegistrationRepository
- All Implemented Interfaces:
Iterable<RelyingPartyRegistration>, IterableRelyingPartyRegistrationRepository, RelyingPartyRegistrationRepository
public final class CachingRelyingPartyRegistrationRepository
extends Object
implements IterableRelyingPartyRegistrationRepository
An
IterableRelyingPartyRegistrationRepository that lazily queries and caches
metadata from a backing IterableRelyingPartyRegistrationRepository. Delegates
caching policies to Spring Cache.- Since:
- 6.4
-
Constructor Summary
ConstructorsConstructorDescriptionCachingRelyingPartyRegistrationRepository(Callable<IterableRelyingPartyRegistrationRepository> loader) -
Method Summary
Modifier and TypeMethodDescription@Nullable RelyingPartyRegistrationfindByRegistrationId(String registrationId) Returns the relying party registration identified by the providedregistrationId, ornullif not found.@Nullable RelyingPartyRegistrationfindUniqueByAssertingPartyEntityId(String entityId) Returns the unique relying party registration associated with the asserting party'sentityIdornullif there is no unique match.voidforEach(Consumer<? super RelyingPartyRegistration> action) iterator()voidsetCache(org.springframework.cache.Cache cache) Use this cache for the completedRelyingPartyRegistrationinstances.
-
Constructor Details
-
CachingRelyingPartyRegistrationRepository
public CachingRelyingPartyRegistrationRepository(Callable<IterableRelyingPartyRegistrationRepository> loader)
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<RelyingPartyRegistration>
-
findByRegistrationId
Returns the relying party registration identified by the providedregistrationId, ornullif not found.- Specified by:
findByRegistrationIdin interfaceRelyingPartyRegistrationRepository- Parameters:
registrationId- the registration identifier- Returns:
- the
RelyingPartyRegistrationif found, otherwisenull
-
findUniqueByAssertingPartyEntityId
Description copied from interface:RelyingPartyRegistrationRepositoryReturns the unique relying party registration associated with the asserting party'sentityIdornullif there is no unique match.- Specified by:
findUniqueByAssertingPartyEntityIdin interfaceRelyingPartyRegistrationRepository- Parameters:
entityId- the asserting party's entity id- Returns:
- the unique
RelyingPartyRegistrationassociated the given asserting party;nullof there is no unique match asserting party
-
forEach
- Specified by:
forEachin interfaceIterable<RelyingPartyRegistration>
-
spliterator
- Specified by:
spliteratorin interfaceIterable<RelyingPartyRegistration>
-
setCache
public void setCache(org.springframework.cache.Cache cache) Use this cache for the completedRelyingPartyRegistrationinstances.Defaults to
ConcurrentMapCache, meaning that the registrations are cached without expiry. To turn off the cache, useNoOpCache.- Parameters:
cache- theCacheto use
-