-
☆ A M B ☆
- 450 Posts
I’m working on a plugin that requires a login to an external system with a special account. Trying to determine where & how I should store the password. A plugin property seems like the best place, except that I’d have to store it in clear text. I suppose I could generate a hash and store that in a property, then decode it in the plugin. Seems like the ideal would be if there were an option to use type "password" on a property or system setting... but there currently doesn’t seem to be such an option.
Thoughts?
If it will only be used by that plugin, the plugin property is probably the best place. If it will be used elsewhere, it could still go there , but it might be better as a setting. It could be a System Setting or a Context Setting, but I think I would probably make it a User Setting for the admin Super User. That way it would be available with $modx->getOption(), but only in the Admin’s sessions.
In any case, you definitely want to store a hash value, not the password itself.