[PR #772] [MERGED] Enforce Passphrase Policy #2582

Closed
opened 2025-11-26 23:21:19 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/772
Author: @vincentsalucci
Created: 3/13/2020
Status: Merged
Merged: 3/14/2020
Merged by: @vincentsalucci

Base: masterHead: feature-passphrase-policy


📝 Commits (3)

  • bda1f43 Enforce passphrase policy
  • 30bfe19 Update multi-line conditional formatting
  • 8e9ab1b Updated formatting round 2

📊 Changes

4 files changed (+87 additions, -4 deletions)

View changed files

📝 src/App/Pages/Generator/GeneratorPage.xaml (+4 -0)
📝 src/App/Pages/Generator/GeneratorPageViewModel.cs (+1 -4)
📝 src/Core/Models/Domain/PasswordGeneratorPolicyOptions.cs (+19 -0)
📝 src/Core/Services/PasswordGenerationService.cs (+63 -0)

📄 Description

Objective

Add missing components for passphrase policy. Use existing data structures/patterns to implement a shared password generator (password/passphrase) for both Android and iOS.

Code Changes

  • GeneratorPage.xaml: Added IsEnabled values for Capitalize and IncludeNumber switches depending on the EnforcedPolicyOptions returned
  • GeneratorPageViewModel.cs: Updated boolean property to use newly added InEffect() function
  • PasswordGeneratorPolicyOptions.cs: Added new fields for tracking the passphrase policy. Created helper method to clear up a long conditional in the view model.
  • PasswordGenerationService.cs: Passphrase options are now enforced during PasswordGeneratorPolicyOptions objection creation. User options are now updated with passphrase options during retrieval. Normalize options will make sure the floor is set with MinNumberWords variable.

Screenshots

Android

0-android-passphrase-enforced

iOS

0-ios-passphrase-enforced


🔄 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/772 **Author:** [@vincentsalucci](https://github.com/vincentsalucci) **Created:** 3/13/2020 **Status:** ✅ Merged **Merged:** 3/14/2020 **Merged by:** [@vincentsalucci](https://github.com/vincentsalucci) **Base:** `master` ← **Head:** `feature-passphrase-policy` --- ### 📝 Commits (3) - [`bda1f43`](https://github.com/bitwarden/android/commit/bda1f43146b30c08acb9ce744c4ab384d506e334) Enforce passphrase policy - [`30bfe19`](https://github.com/bitwarden/android/commit/30bfe195c256c7865d878cb4bf3977872c2d3ee7) Update multi-line conditional formatting - [`8e9ab1b`](https://github.com/bitwarden/android/commit/8e9ab1b35780fec71f6bce3732001b9a59002044) Updated formatting round 2 ### 📊 Changes **4 files changed** (+87 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Generator/GeneratorPage.xaml` (+4 -0) 📝 `src/App/Pages/Generator/GeneratorPageViewModel.cs` (+1 -4) 📝 `src/Core/Models/Domain/PasswordGeneratorPolicyOptions.cs` (+19 -0) 📝 `src/Core/Services/PasswordGenerationService.cs` (+63 -0) </details> ### 📄 Description ## Objective > Add missing components for passphrase policy. Use existing data structures/patterns to implement a shared password generator (password/passphrase) for both Android and iOS. ## Code Changes - **GeneratorPage.xaml**: Added `IsEnabled` values for `Capitalize` and `IncludeNumber` switches depending on the `EnforcedPolicyOptions` returned - **GeneratorPageViewModel.cs**: Updated boolean property to use newly added `InEffect()` function - **PasswordGeneratorPolicyOptions.cs**: Added new fields for tracking the passphrase policy. Created helper method to clear up a long conditional in the view model. - **PasswordGenerationService.cs**: Passphrase options are now enforced during `PasswordGeneratorPolicyOptions` objection creation. User options are now updated with passphrase options during retrieval. Normalize options will make sure the floor is set with `MinNumberWords` variable. ## Screenshots ### Android ![0-android-passphrase-enforced](https://user-images.githubusercontent.com/26154748/76647764-6aeae700-652b-11ea-9a92-c684db784641.png) ### iOS ![0-ios-passphrase-enforced](https://user-images.githubusercontent.com/26154748/76647782-73432200-652b-11ea-96b6-6c0cf43e665d.png) --- <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 2025-11-26 23:21:19 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2582