-
Notifications
You must be signed in to change notification settings - Fork 194
Adds a findCredentials method which yields an array of account/password objects of all matching saved credentials #56 #85
Conversation
b965b80
to
7d417db
Compare
@BinaryMuse would you be willing to review this? |
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.
Thanks for the PR @siebertm! This looks great. I've requested a few small changes, then I think this will be good to merge.
package-lock.json
Outdated
@@ -1,7 +1,8 @@ | |||
{ | |||
"name": "keytar", | |||
"version": "4.0.4", |
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.
Do you mind checking out the changes to package-lock.json
so that the file isn't modified in this PR?
@@ -68,4 +72,25 @@ describe("keytar", function() { | |||
assert.equal(await keytar.findPassword(service), null) | |||
}) | |||
}) | |||
|
|||
describe('findCredentials(service)', function() { |
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.
Let's add a test here that checks the behavior when no credentials are found.
}; | ||
callback->Call(2, argv); | ||
} else { | ||
v8::Local<v8::Value> argv[] = { |
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 think I'd prefer to see an empty array returned here, so users don't have to do null
checking on the result of the operation.
…rd objects of all matching saved credentials atom#56
7d417db
to
92eb512
Compare
@BinaryMuse thanks for your input! I incorporated your comments in my changes now - I actually fell over the This should be ready now. |
Thanks very much! This is great! |
Version |
This PR addresses the need to find all accounts/password should you want to save multiple accounts in your keychain. Fixes #56
If I missed anything, please tell me and I'll try to fix it.