-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hint functionality for user password (#18)
* Added hint textfield * Added hint textfield * Changed the Id according to naming convention * Branch updated * Reverted the accidental changes * Reverted the change * Added functionality to display and hide the hint inside login fragment. * Added functionality to display and hide the hint inside login fragment. * Added functionality to display and hide the hint inside login fragment. * Updated functionality to show and hide hint in Login Fragment with Util methods. * Updated Java Version to match build.gradle * made a few changes * Updated Util methods * Updated the code for displaying hint * Added Encryption function to encrypt hint inside UserDetailDaoSecure * Added encryption to hint * Added function to call hint in UserDetailsDao * Added getHint function in UserDetailsDaoSecure * Updated the code to get hint * Added method to call dao in repository * Calling repo method in viewmodel * Added functionality to display hint in login fragment * Made the required changes * Updated the code * Display hint in login screen * Updated the code * Added validation rule for hint length * Added validation check for hint * Fixed issues with hint error * handling hint validation Signed-off-by: Nitin Verma <[email protected]> * doing validation in background Signed-off-by: Nitin Verma <[email protected]> Co-authored-by: Nitin Verma <[email protected]>
- Loading branch information
Showing
14 changed files
with
257 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
app/src/main/java/com/andryoga/safebox/data/repository/interfaces/UserDetailsRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package com.andryoga.safebox.data.repository.interfaces | ||
|
||
interface UserDetailsRepository { | ||
suspend fun insertUserDetailsData(password: String, hint: String) | ||
suspend fun insertUserDetailsData(password: String, hint: String?) | ||
suspend fun checkPassword(password: String): Boolean | ||
suspend fun getHint(): String? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...terPswrd/PasswordValidationFailureCode.kt → ...ChooseMasterPswrdValidationFailureCode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package com.andryoga.safebox.ui.view.chooseMasterPswrd | ||
|
||
enum class PasswordValidationFailureCode { | ||
enum class ChooseMasterPswrdValidationFailureCode { | ||
LOW_PASSWORD_LENGTH, | ||
LESS_SPECIAL_CHAR_COUNT, | ||
NOT_MIX_CASE, | ||
LESS_NUMERIC_COUNT, | ||
ALTERNATE_CHAR_FOUND, | ||
PASSWORD_DO_NOT_MATCH | ||
PASSWORD_DO_NOT_MATCH, | ||
HINT_IS_SUBSET | ||
} |
Oops, something went wrong.