Class JpaUserCredentialRepositoryAdapter

java.lang.Object
sk.iway.iwcm.system.spring.passkey.JpaUserCredentialRepositoryAdapter
All Implemented Interfaces:
org.springframework.security.web.webauthn.management.UserCredentialRepository

@Component public class JpaUserCredentialRepositoryAdapter extends Object implements org.springframework.security.web.webauthn.management.UserCredentialRepository
JPA-backed adapter implementing Spring Security's UserCredentialRepository. Bridges between Spring Security's WebAuthn API (which works with CredentialRecord interface and Bytes IDs) and our JPA PasskeyCredentialBean entities. This replaces the previous JdbcUserCredentialRepository that had persistence issues with the project's DataSource/connection pool.
  • Constructor Details

  • Method Details

    • save

      @Transactional public void save(org.springframework.security.web.webauthn.api.CredentialRecord record)
      Specified by:
      save in interface org.springframework.security.web.webauthn.management.UserCredentialRepository
    • findByCredentialId

      @Transactional(readOnly=true) public org.springframework.security.web.webauthn.api.CredentialRecord findByCredentialId(org.springframework.security.web.webauthn.api.Bytes credentialId)
      Specified by:
      findByCredentialId in interface org.springframework.security.web.webauthn.management.UserCredentialRepository
    • findByUserId

      @Transactional(readOnly=true) public List<org.springframework.security.web.webauthn.api.CredentialRecord> findByUserId(org.springframework.security.web.webauthn.api.Bytes userId)
      Specified by:
      findByUserId in interface org.springframework.security.web.webauthn.management.UserCredentialRepository
    • delete

      @Transactional public void delete(org.springframework.security.web.webauthn.api.Bytes credentialId)
      Specified by:
      delete in interface org.springframework.security.web.webauthn.management.UserCredentialRepository