[java-idp-plugin-webauthn] branch main updated: Require that the IdPStorageServiceCredentialRepository is factory built

Phil Smart philip.smart at jisc.ac.uk
Thu Jul 31 10:55:03 UTC 2025


This is an automated email from the git hooks/post-receive script.

philsmart pushed a commit to branch main
in repository java-idp-plugin-webauthn.

View the commit online:
http://git.shibboleth.net/view/?p=java-idp-plugin-webauthn.git;a=commit;h=8046db6bd2106d84f0bb2ce38d221fa15ca76e5f

The following commit(s) were added to refs/heads/main by this push:
     new 8046db6  Require that the IdPStorageServiceCredentialRepository is factory built
8046db6 is described below

commit 8046db6bd2106d84f0bb2ce38d221fa15ca76e5f
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Thu Jul 31 11:55:01 2025 +0100

    Require that the IdPStorageServiceCredentialRepository is factory built
---
 .../impl/IdPStorageServiceCredentialRepository.java      | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRepository.java b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRepository.java
index f574a42..3216a3c 100644
--- a/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRepository.java
+++ b/webauthn-impl/src/main/java/net/shibboleth/idp/plugin/authn/webauthn/storage/impl/IdPStorageServiceCredentialRepository.java
@@ -110,8 +110,12 @@ public class IdPStorageServiceCredentialRepository extends AbstractIdentifiableI
      */
     @Nonnull private Function<String, List<StorageRecord<Set<CredentialRecord>>>> storageRecordCacheLoader;
     
-    /** Constructor.*/
-    public IdPStorageServiceCredentialRepository() {
+    /** 
+     * Package-private Constructor.
+     * 
+     * <p>Should only be instantiated by the {@link StorageServiceCredentialRepositoryFactory}.</p>
+     */
+    IdPStorageServiceCredentialRepository() {
         storageRecordCacheLoader = context -> CollectionSupport.emptyList();
     }
     
@@ -280,7 +284,6 @@ public class IdPStorageServiceCredentialRepository extends AbstractIdentifiableI
     @Nullable protected String getUsernameFromUserHandleCache(@Nonnull final ByteArray userHandle) {
         checkComponentActive();
         
-        log.trace("Getting username for userHandle '{}' from cache", userHandle.getBase64Url());
         final String usernameMapping = userHandleMappingCacheService.getIfPresent(userHandle);
         
         if (usernameMapping != null) {
@@ -320,8 +323,7 @@ public class IdPStorageServiceCredentialRepository extends AbstractIdentifiableI
                     return usernameMapping;
                 }
             }
-        }
-        log.trace("{}: Userhandle '{}' not found in cache", getId(), userHandle.getBase64Url());
+        }        
         return null;
     }
     
@@ -340,9 +342,8 @@ public class IdPStorageServiceCredentialRepository extends AbstractIdentifiableI
      * or the mapping is found to be inconsistent.
      */
     @Nullable protected String getUsernameFromCredentialIdCache(@Nonnull final ByteArray credentialId) {
-        checkComponentActive();
+        checkComponentActive();        
         
-        log.trace("Getting username for credentialId '{}' from cache", credentialId.getBase64Url());
         final String usernameMapping = credentialIdMappingCacheService.getIfPresent(credentialId);
         
         if (usernameMapping != null) {
@@ -383,7 +384,6 @@ public class IdPStorageServiceCredentialRepository extends AbstractIdentifiableI
                 }
             }
         }
-        log.trace("{}: CredentialId '{}' not found in cache", getId(), credentialId.getBase64Url());
         return null;
     }
     

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list