PasswordsManager - EranOfek/AstroPack GitHub Wiki

PasswordsManager

PasswordsManager is a class that allows you to manage local passwords used by MATLAB. In order to protect your passwords, the passwords are stored in the AstroPack/config/local directory which is ignored by github!

Example for a Passwords.yml file:

The passwords are stored in a file named 'Passwords.yml' in the AstroPack/config/local directory. Each line is of the format:

<ProjectName> : ['User', 'Password','e-mail', 'Functions', 'URL']

Here, Functions is an optional list of functions that may use the password.

For example:

LASTDB_Root   : ['*','*', '', '', '']
PTF           : ['*', '*', '', 'http://irsa.ipac.caltech.edu/account/signon/']
ZTF_Archive   : ['*', '*', '', '', 'https://ztfweb.ipac.caltech.edu/ztf/archive/']
ZTF_IPAC      : ['*', '*', '', '', 'https://irsa.ipac.caltech.edu//ibe/search/ztf/products']

Working with the PasswordManager

Creating the object:

PM = PasswordsManager
% In case you update the Passwords.yml file - reload it using:
PM.Config.reloadSysConfig

Examples for common searches:

[User,Pass]=PM.getUserPassword('LASTDB_Root')

R = PM.getAllData
R = PM.getProjects
R=getAllKey(PM, 'User')
S=PM.toStruct;