[PR #6323] [MERGED] [PM-28271] Rename validatePin to validatePinUserKey and update SDK usage #36988

Closed
opened 2026-04-21 04:04:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6323
Author: @SaintPatrck
Created: 1/5/2026
Status: Merged
Merged: 1/5/2026
Merged by: @SaintPatrck

Base: mainHead: PM-28271/passkey-invalid-pin


📝 Commits (2)

  • 71808d2 [PM-28271] Rename validatePin to validatePinUserKey and update SDK usage
  • e383418 Update exception message

📊 Changes

10 files changed (+91 additions, -78 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepository.kt (+3 -3)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt (+4 -4)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/VaultSdkSource.kt (+4 -3)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/VaultSdkSourceImpl.kt (+7 -3)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt (+1 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt (+1 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt (+42 -40)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/VaultSdkSourceTest.kt (+11 -5)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt (+8 -8)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt (+10 -10)

📄 Description

🎟️ Tracking

PM-28271

📔 Objective

Refactors the PIN validation logic across the data and presentation layers to explicitly refer to user key validation. This change aligns with the underlying SDK by invoking validatePinProtectedUserKeyEnvelope and updating parameter naming to clarify that a user key envelope is being validated.

Specific changes:

  • VaultSdkSource and VaultSdkSourceImpl: Renamed validatePin to validatePinUserKey and renamed the pinProtectedUserKey parameter to pinProtectedUserKeyEnvelope.
  • VaultSdkSourceImpl: Updated the internal SDK call to use clientAuth.validatePinProtectedUserKeyEnvelope.
  • AuthRepository and AuthRepositoryImpl: Renamed validatePin to validatePinUserKey and updated KDoc.
  • VaultAddEditViewModel: Updated usage to call authRepository.validatePinUserKey.
  • VaultItemListingViewModel: Updated usage to call authRepository.validatePinUserKey.
  • AuthRepositoryTest, VaultSdkSourceTest, VaultAddEditViewModelTest, and VaultItemListingViewModelTest: Updated unit tests to reflect the API renaming and updated mock expectations.

📸 Screenshots

Coming soon!

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6323 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 1/5/2026 **Status:** ✅ Merged **Merged:** 1/5/2026 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-28271/passkey-invalid-pin` --- ### 📝 Commits (2) - [`71808d2`](https://github.com/bitwarden/android/commit/71808d27dee2abb6585634cec48caab10b7eb952) [PM-28271] Rename validatePin to validatePinUserKey and update SDK usage - [`e383418`](https://github.com/bitwarden/android/commit/e383418e4871fd4c02a6838f6c445ddd446639ea) Update exception message ### 📊 Changes **10 files changed** (+91 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepository.kt` (+3 -3) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryImpl.kt` (+4 -4) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/VaultSdkSource.kt` (+4 -3) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/VaultSdkSourceImpl.kt` (+7 -3) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt` (+1 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModel.kt` (+1 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/auth/repository/AuthRepositoryTest.kt` (+42 -40) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/VaultSdkSourceTest.kt` (+11 -5) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModelTest.kt` (+8 -8) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/itemlisting/VaultItemListingViewModelTest.kt` (+10 -10) </details> ### 📄 Description ## 🎟️ Tracking PM-28271 ## 📔 Objective Refactors the PIN validation logic across the data and presentation layers to explicitly refer to user key validation. This change aligns with the underlying SDK by invoking `validatePinProtectedUserKeyEnvelope` and updating parameter naming to clarify that a user key envelope is being validated. Specific changes: * `VaultSdkSource` and `VaultSdkSourceImpl`: Renamed `validatePin` to `validatePinUserKey` and renamed the `pinProtectedUserKey` parameter to `pinProtectedUserKeyEnvelope`. * `VaultSdkSourceImpl`: Updated the internal SDK call to use `clientAuth.validatePinProtectedUserKeyEnvelope`. * `AuthRepository` and `AuthRepositoryImpl`: Renamed `validatePin` to `validatePinUserKey` and updated KDoc. * `VaultAddEditViewModel`: Updated usage to call `authRepository.validatePinUserKey`. * `VaultItemListingViewModel`: Updated usage to call `authRepository.validatePinUserKey`. * `AuthRepositoryTest`, `VaultSdkSourceTest`, `VaultAddEditViewModelTest`, and `VaultItemListingViewModelTest`: Updated unit tests to reflect the API renaming and updated mock expectations. ## 📸 Screenshots Coming soon! ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-21 04:04:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#36988