Class JdbcAssertingPartyMetadataRepository
java.lang.Object
org.springframework.security.saml2.provider.service.registration.JdbcAssertingPartyMetadataRepository
- All Implemented Interfaces:
Iterable<AssertingPartyMetadata>,AssertingPartyMetadataRepository
public final class JdbcAssertingPartyMetadataRepository
extends Object
implements AssertingPartyMetadataRepository
A JDBC implementation of
AssertingPartyMetadataRepository.- Since:
- 7.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Constructor Summary
ConstructorsConstructorDescriptionJdbcAssertingPartyMetadataRepository(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Constructs aJdbcRelyingPartyRegistrationRepositoryusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionfindByEntityId(String entityId) Retrieve anAssertingPartyMetadataby its EntityID.iterator()voidsave(AssertingPartyMetadata metadata) Persist thisAssertingPartyMetadatavoidsetRowMapper(org.springframework.jdbc.core.RowMapper<AssertingPartyMetadata> rowMapper) Set theRowMapperto use for readingAssertingPartyMetadatarecords from the database.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
JdbcAssertingPartyMetadataRepository
public JdbcAssertingPartyMetadataRepository(org.springframework.jdbc.core.JdbcOperations jdbcOperations) Constructs aJdbcRelyingPartyRegistrationRepositoryusing the provided parameters.- Parameters:
jdbcOperations- the JDBC operations
-
-
Method Details
-
findByEntityId
Description copied from interface:AssertingPartyMetadataRepositoryRetrieve anAssertingPartyMetadataby its EntityID.- Specified by:
findByEntityIdin interfaceAssertingPartyMetadataRepository- Parameters:
entityId- the EntityID to lookup- Returns:
- the found
AssertingPartyMetadata, ornullotherwise
-
iterator
- Specified by:
iteratorin interfaceIterable<AssertingPartyMetadata>
-
save
Persist thisAssertingPartyMetadata- Parameters:
metadata- the metadata to persist
-
setRowMapper
Set theRowMapperto use for readingAssertingPartyMetadatarecords from the database. By default,JdbcAssertingPartyMetadataRepository.AssertingPartyMetadataRowMapperis used.Note that the default row mapper protects against insecure deserialization of credentials by way of
JdbcAssertingPartyMetadataRepository.AssertingPartyMetadataRowMapper.Saml2X509CredentialCollectionDeserializer, which uses an allowlist of classes that can be deserialized. If a custom row mapper is used, it is the responsibility of the developer to ensure that any deserialization of credentials is done securely.- Parameters:
rowMapper- - the rowMapper to use- Since:
- 7.0.5
- See Also:
-