-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: extended password verification #2134
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2134 +/- ##
=============================================
+ Coverage 57.63% 57.64% +0.01%
Complexity 24 24
=============================================
Files 1031 1031
Lines 38704 38719 +15
Branches 3519 3522 +3
=============================================
+ Hits 22306 22321 +15
Misses 14896 14896
Partials 1502 1502
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👨🏻🍳🤌 Nice!
Nice overall. Please ignore my comment as it's just food for thought really.
val missingLowercaseCharacter: Boolean = true, | ||
val missingUppercaseCharacter: Boolean = true, | ||
val missingDigit: Boolean = true, | ||
val missingSpecialCharacter: Boolean = true, | ||
val tooShort: Boolean = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: maybe use a Set<Criteria>
instead of multiple fields.
For example:
enum class Criteria {
LOWERCASE, UPPERCASE, NUMERIC_DIGIT, SPECIAL_CHARACTER, MINIMUM_LENGTH;
}
sealed interface ValidatePasswordResult {
data object Valid: ValidatePasswordResult()
data class Invalid(val missingCriteria: Set<Criteria>)
}
In any case, not something I'd change now that it's done. Just food for thought really. Aiming to make the API a tiny bit more scalable.
…word_verification
Datadog ReportAll test runs ✅ 2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed Test Services
|
…word_verification
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
Currently we can only verify if the whole password is valid or not, but some screens require to show which elements are still missing (like "one uppercase character").
Solutions
Change the use case to return the sealed class where
Invalid
contains multiple fields to know exactly which elements are still missing in the password.Testing
Test Coverage (Optional)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.