@@ -113,16 +113,20 @@ class IssuedDocument(
113113 }
114114
115115 /* *
116- * Retrieves all valid credentials associated with this document.
116+ * Retrieves all credentials associated with this document that pass structural validity checks .
117117 *
118118 * This method filters the document's credentials based on several criteria:
119119 * - Only certified credentials bound to a secure area
120120 * - Only credentials that are not invalidated
121121 * - Only credentials that belong to the current document manager
122122 * - For OneTimeUse policy, only credentials that haven't been used (usageCount == 0)
123- * - For RotateUse policy, all valid credentials
123+ * - For RotateUse policy, all credentials regardless of usage count
124124 *
125- * @return A list of valid [SecureAreaBoundCredential] objects
125+ * **Note:** This method does **not** filter by temporal validity (`validFrom`/`validUntil`).
126+ * The returned list may include credentials that are expired or not yet valid.
127+ * Use [findCredential] to obtain a credential that is valid at a specific point in time.
128+ *
129+ * @return A list of [SecureAreaBoundCredential] objects that pass structural validity checks
126130 */
127131 suspend fun getCredentials (): List <SecureAreaBoundCredential > {
128132 return baseDocument.getCertifiedCredentials()
@@ -169,6 +173,14 @@ class IssuedDocument(
169173 return candidate
170174 }
171175
176+ /* *
177+ * Returns the number of credentials that pass structural validity checks.
178+ *
179+ * Delegates to [getCredentials], which does **not** filter by temporal validity.
180+ * This count may include expired or not-yet-valid credentials.
181+ * To check how many credentials are currently usable, filter [getCredentials] by
182+ * `validFrom`/`validUntil` or use [findCredential] to check if at least one is valid.
183+ */
172184 override suspend fun credentialsCount (): Int {
173185 return getCredentials().size
174186 }
0 commit comments