Login/Password Management
Hi All,
I am needing functionality in my plugin development that will allow me to store login/password combination on a per project basis. Is this something that is possible through the use of the normal API or will I need to come up with a solution of my own? I have looked at PasswordSafe class but that wasn't very friendly to me and I cannot find any examples. Does anyone have any suggestions or could possibly point me in the right direction?
Thanks!
Please sign in to leave a comment.
Update 2/27:
I believe I have figured it out finally. I was close but wasn't all the way there. I am using the Master Password here. There is another one for the in the memory that would be passwordSafe.getMemoryProvider()......
You need an instance of the PasswordSafe.
To Store Password:
Pretty self explanatory here. I am using my project as the reference, whatever class is doing the action in the requester (for example, it will show the class name when prompting for the password), the project name as the key and the actual password. This will allow me to store a password for a given project name as the key. I may add more to the key just to make it a little more unique but that's the general idea.
To Retrieve Password:
Using the same provider you stored the password with, retrieve the password using the project reference, requestor class and key.
Hopefully this will help someone else that is needing this as well. It just wasn't that easy to find for me.
Thanks!
Thanks for posting your findings here, Chris - that's very helpful.
Great explanation. Was easy to add. Thanks.
With the 2016.3 release(s) of the IDEs, this method will no longer work as a lot of it has been deprecated. Here is the new way I have implemented it: