Table of Contents

Interface IAuthenticationService

Namespace
Core.CliniCore.Domain.Authentication
Assembly
Core.CliniCore.dll

Defines the contract for authentication operations in the CliniCore system

public interface IAuthenticationService

Methods

Authenticate(string, string)

Authenticates a user with username and password

AuthenticationResult Authenticate(string username, string password)

Parameters

username string

The username to authenticate

password string

The password to verify

Returns

AuthenticationResult

Authentication result with profile on success, or failure reason

ChangePassword(string, string, string)

Changes a user's password

bool ChangePassword(string username, string currentPassword, string newPassword)

Parameters

username string

The username whose password to change

currentPassword string

The current password for verification

newPassword string

The new password to set

Returns

bool

True if password change successful, false otherwise

GetLastLoginTime(string)

Gets the last login time for a user

DateTime? GetLastLoginTime(string username)

Parameters

username string

The username to check

Returns

DateTime?

The last login DateTime, or null if never logged in

Register(IUserProfile, string)

Registers a new user in the system

bool Register(IUserProfile profile, string password)

Parameters

profile IUserProfile

The user profile to register

password string

The password for the new user

Returns

bool

True if registration successful, false otherwise

UserExists(string)

Checks if a username already exists in the system

bool UserExists(string username)

Parameters

username string

The username to check

Returns

bool

True if username exists, false otherwise

ValidatePasswordStrength(string)

Validates if a password meets security requirements

bool ValidatePasswordStrength(string password)

Parameters

password string

The password to validate

Returns

bool

True if password meets requirements, false otherwise