-
Notifications
You must be signed in to change notification settings - Fork 12
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: Persist OTPs in keystore and prevent reuse of OTPs #1609
Conversation
packages/at_secondary_server/lib/src/verb/handler/enroll_verb_handler.dart
Outdated
Show resolved
Hide resolved
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.
I don't like the idea of verb handlers using internal functionality of other verb handlers. Is there a better / cleaner way of making that validation functionality more explicitly available?
packages/at_secondary_server/lib/src/verb/handler/abstract_verb_handler.dart
Outdated
Show resolved
Hide resolved
git: | ||
url: https://github.com/atsign-foundation/at_libraries.git | ||
path: packages/at_commons | ||
ref: expire_otp_changes |
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.
I've merged the at_commons PR so please publish at_commons 3.0.57 and remove this dependency override
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.
Sure Gary, Thank you.
Updated the at_commons version to 3.0.57. |
|
||
OtpVerbHandler(SecondaryKeyStore keyStore) : super(keyStore); | ||
|
||
@override | ||
bool accept(String command) => | ||
command == 'otp:get' || command.startsWith('otp:validate'); | ||
bool accept(String command) => command.startsWith('otp'); |
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.
Should be command.startsWith('otp:get')
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.
or command == 'otp:get'
- What I did
- How to verify it
Following are the unit tests:
Following are the functional tests:
- Description for the changelog