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
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
usernamestringThe username whose password to change
currentPasswordstringThe current password for verification
newPasswordstringThe 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
usernamestringThe 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
profileIUserProfileThe user profile to register
passwordstringThe 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
usernamestringThe 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
passwordstringThe password to validate
Returns
- bool
True if password meets requirements, false otherwise