Class AuthController
Controller for authentication-related API endpoints
Inherited Members
Namespace: OEMS.UI.Controllers
Assembly: OEMS.UI.dll
Syntax
[ApiController]
[Route("api/[controller]")]
public class AuthController : ControllerBase
Constructors
AuthController(IAuthService, IOrganizationService)
Declaration
public AuthController(IAuthService authService, IOrganizationService organizationService)
Parameters
Type | Name | Description |
---|---|---|
IAuthService | authService | |
IOrganizationService | organizationService |
Methods
ConfirmPasswordReset(PasswordResetConfirmDto)
Confirms password reset with new password
Declaration
[HttpPost("password-reset/confirm")]
public Task<IActionResult> ConfirmPasswordReset(PasswordResetConfirmDto request)
Parameters
Type | Name | Description |
---|---|---|
PasswordResetConfirmDto | request | Password reset confirmation request |
Returns
Type | Description |
---|---|
Task<IActionResult> | Reset confirmation result |
InitiatePasswordReset(PasswordResetRequestDto)
Initiates a password reset process
Declaration
[HttpPost("password-reset/initiate")]
public Task<IActionResult> InitiatePasswordReset(PasswordResetRequestDto request)
Parameters
Type | Name | Description |
---|---|---|
PasswordResetRequestDto | request | Password reset request containing email |
Returns
Type | Description |
---|---|
Task<IActionResult> | Success status |
Logout()
Logs out the current user
Declaration
[HttpPost("logout")]
public IActionResult Logout()
Returns
Type | Description |
---|---|
IActionResult | Logout confirmation |
TransferAdmin(TransferAdminDto)
Transfers organization admin rights to another user
Declaration
[HttpPost("transfer-admin")]
public Task<IActionResult> TransferAdmin(TransferAdminDto request)
Parameters
Type | Name | Description |
---|---|---|
TransferAdminDto | request | Transfer admin request containing organization and user IDs |
Returns
Type | Description |
---|---|
Task<IActionResult> | Transfer result |
ValidatePasswordResetToken(string)
Validates a password reset token
Declaration
[HttpGet("password-reset/validate")]
public Task<IActionResult> ValidatePasswordResetToken(string token)
Parameters
Type | Name | Description |
---|---|---|
string | token | Token to validate |
Returns
Type | Description |
---|---|
Task<IActionResult> | Token validity status |
ValidatePasswordResetTokenWithBranding(string)
Validates a password reset token and returns organization branding information
Declaration
[HttpGet("password-reset/validate-with-branding")]
public Task<IActionResult> ValidatePasswordResetTokenWithBranding(string token)
Parameters
Type | Name | Description |
---|---|---|
string | token | Token to validate |
Returns
Type | Description |
---|---|
Task<IActionResult> | Token validity status with organization branding data |