[−][src]Trait splinter::biome::credentials::store::CredentialsStore
Defines methods for CRUD operations and fetching a user’s credentials without defining a storage strategy
Required methods
fn add_credentials(&self, credentials: T) -> Result<(), CredentialsStoreError>
fn update_credentials(
&self,
user_id: &str,
updated_username: &str,
updated_password: &str
) -> Result<(), CredentialsStoreError>
&self,
user_id: &str,
updated_username: &str,
updated_password: &str
) -> Result<(), CredentialsStoreError>
Replaces a credential of a certain type for a user in the underlying storage with new credentials. This assumes that the user has only one credential of a certain type in storage
Arguments
user_id
- The unique identifier of the user credential belongs toupdated_username
- The updated username for the userupdated_password
- The updated password for the user
fn remove_credentials(&self, user_id: &str) -> Result<(), CredentialsStoreError>
Removes a credential from a user from the underlying storage
Arguments
user_id
- The unique identifier of the user credential belongs to
fn fetch_credential_by_user_id(
&self,
user_id: &str
) -> Result<T, CredentialsStoreError>
&self,
user_id: &str
) -> Result<T, CredentialsStoreError>
Fetches a credential for a user
Arguments
user_id
- The unique identifier of the user credential belongs to
fn fetch_credential_by_username(
&self,
username: &str
) -> Result<T, CredentialsStoreError>
&self,
username: &str
) -> Result<T, CredentialsStoreError>
fn fetch_username_by_id(
&self,
user_id: &str
) -> Result<UsernameId, CredentialsStoreError>
&self,
user_id: &str
) -> Result<UsernameId, CredentialsStoreError>