Interface IUserService
Payroll user service
Inherited Members
Namespace: PayrollEngine.Client.Service
Assembly: PayrollEngine.Client.Core.dll
Syntax
public interface IUserService : ICrudService<IUser, TenantServiceContext, Query>, ICreateService<IUser, TenantServiceContext, Query>, IReadService<IUser, TenantServiceContext, Query>, IAttributeService<TenantServiceContext>
Methods
GetAsync<T>(TenantServiceContext, string)
Get user by identifier
Declaration
Task<T> GetAsync<T>(TenantServiceContext context, string identifier) where T : class, IUser
Parameters
| Type | Name | Description |
|---|---|---|
| TenantServiceContext | context | The service context |
| string | identifier | The user identifier |
Returns
| Type | Description |
|---|---|
| Task<T> | The user, null if missing |
Type Parameters
| Name | Description |
|---|---|
| T |
TestPasswordAsync(TenantServiceContext, int, string)
Test user password
Declaration
Task<bool> TestPasswordAsync(TenantServiceContext context, int userId, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| TenantServiceContext | context | The service context |
| int | userId | The user id |
| string | password | The new user password |
Returns
| Type | Description |
|---|---|
| Task<bool> | True for a valid password |
UpdatePasswordAsync(TenantServiceContext, int, PasswordChangeRequest)
Update the user password
Declaration
Task UpdatePasswordAsync(TenantServiceContext context, int userId, PasswordChangeRequest changeRequest)
Parameters
| Type | Name | Description |
|---|---|---|
| TenantServiceContext | context | The service context |
| int | userId | The user id |
| PasswordChangeRequest | changeRequest | The password change request including the existing and new password |
Returns
| Type | Description |
|---|---|
| Task | The updated user |
Remarks
The existing password is mandatory on password change