Sage Bionetworks interview question

Q: Desing java classes to read user credentials from different sources (File, property,system config etc)