Document getCredentials() as a public API.

Closes #246