Replaced CredentialsFunction with CredentialsStore interface.