Table of Contents

Interface ICredentialRepository

Namespace
Core.CliniCore.Repositories
Assembly
Core.CliniCore.dll

Repository interface for user credential operations. Extends generic repository with credential-specific queries.

public interface ICredentialRepository : IRepository<UserCredential>
Inherited Members

Methods

Exists(string)

Checks if a username already exists.

bool Exists(string username)

Parameters

username string

Returns

bool

GetByUsername(string)

Gets a credential by username (the natural key for authentication).

UserCredential? GetByUsername(string username)

Parameters

username string

Returns

UserCredential

Register(Guid, string, string, string)

Registers a new user credential with password hashing. Remote repositories call the API; local repositories hash and store.

UserCredential? Register(Guid id, string username, string password, string role)

Parameters

id Guid
username string
password string
role string

Returns

UserCredential

The created credential, or null if registration failed.