My Project 1.0
Open Source Encrypted Vault Storage
Loading...
Searching...
No Matches
ignivault.ApiClient.Auth.AuthApiClient Class Reference
Inheritance diagram for ignivault.ApiClient.Auth.AuthApiClient:
Collaboration diagram for ignivault.ApiClient.Auth.AuthApiClient:

Public Member Functions

 AuthApiClient (HttpClient httpClient, ITokenManager tokenManager)
async Task< ApiResponseRegisterAsync (RegisterRequestDto request)
 Registers a new user with the provided registration details.
async Task< ApiResponse< LoginResponseDto > > LoginAsync (ignivault.Shared.DTOs.Auth.LoginRequestDto request)
 Logs in a user with the provided credentials.
async Task LogoutAsync ()
 Logs out the current user by clearing the stored authentication token.
async Task< ApiResponse< LoginResponseDto > > Login2faAsync (Login2faRequestDto request)
 Logs in a user with 2FA code after initial login indicates 2FA is required.
async Task< ApiResponse< Enable2faResponseDto > > Enable2faAsync ()
 Enables two-factor authentication for the current user, returning the setup details.
async Task< ApiResponse< Verify2faResponseDto > > Verify2faAsync (Verify2faRequestDto request)
 Verifies the 2FA code provided by the user to complete the 2FA setup process.
async Task< ApiResponseForgotPasswordAsync (ForgotPasswordRequestDto request)
 Forgot password - initiates the password reset process by sending a reset email.
async Task< ApiResponseResetPasswordAsync (ResetPasswordRequestDto request)
 Resets the user's password using the token and new password provided.

Events

Func< Task >? OnLoginSuccess
Func< Task >? OnLogout
Events inherited from ignivault.ApiClient.Auth.IAuthApiClient
Func< Task >? OnLoginSuccess
 Occurs when a user successfully logs in.
Func< Task >? OnLogout
 Occurs when a user logs out.

Detailed Description

Definition at line 71 of file AuthApiClient.cs.

Constructor & Destructor Documentation

◆ AuthApiClient()

ignivault.ApiClient.Auth.AuthApiClient.AuthApiClient ( HttpClient httpClient,
ITokenManager tokenManager )
inline

Definition at line 79 of file AuthApiClient.cs.

Member Function Documentation

◆ Enable2faAsync()

async Task< ApiResponse< Enable2faResponseDto > > ignivault.ApiClient.Auth.AuthApiClient.Enable2faAsync ( )
inline

Enables two-factor authentication for the current user, returning the setup details.

Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 135 of file AuthApiClient.cs.

◆ ForgotPasswordAsync()

async Task< ApiResponse > ignivault.ApiClient.Auth.AuthApiClient.ForgotPasswordAsync ( ForgotPasswordRequestDto request)
inline

Forgot password - initiates the password reset process by sending a reset email.

Parameters
request
Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 155 of file AuthApiClient.cs.

◆ Login2faAsync()

async Task< ApiResponse< LoginResponseDto > > ignivault.ApiClient.Auth.AuthApiClient.Login2faAsync ( Login2faRequestDto request)
inline

Logs in a user with 2FA code after initial login indicates 2FA is required.

Parameters
request
Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 120 of file AuthApiClient.cs.

◆ LoginAsync()

async Task< ApiResponse< LoginResponseDto > > ignivault.ApiClient.Auth.AuthApiClient.LoginAsync ( ignivault.Shared.DTOs.Auth.LoginRequestDto request)
inline

Logs in a user with the provided credentials.

Parameters
request
Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 94 of file AuthApiClient.cs.

◆ LogoutAsync()

async Task ignivault.ApiClient.Auth.AuthApiClient.LogoutAsync ( )
inline

Logs out the current user by clearing the stored authentication token.

Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 112 of file AuthApiClient.cs.

◆ RegisterAsync()

async Task< ApiResponse > ignivault.ApiClient.Auth.AuthApiClient.RegisterAsync ( RegisterRequestDto request)
inline

Registers a new user with the provided registration details.

Parameters
request
Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 87 of file AuthApiClient.cs.

◆ ResetPasswordAsync()

async Task< ApiResponse > ignivault.ApiClient.Auth.AuthApiClient.ResetPasswordAsync ( ResetPasswordRequestDto request)
inline

Resets the user's password using the token and new password provided.

Parameters
request
Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 162 of file AuthApiClient.cs.

◆ Verify2faAsync()

async Task< ApiResponse< Verify2faResponseDto > > ignivault.ApiClient.Auth.AuthApiClient.Verify2faAsync ( Verify2faRequestDto request)
inline

Verifies the 2FA code provided by the user to complete the 2FA setup process.

Parameters
request
Returns

Implements ignivault.ApiClient.Auth.IAuthApiClient.

Definition at line 144 of file AuthApiClient.cs.

Event Documentation

◆ OnLoginSuccess

Func<Task>? ignivault.ApiClient.Auth.AuthApiClient.OnLoginSuccess

Definition at line 76 of file AuthApiClient.cs.

◆ OnLogout

Func<Task>? ignivault.ApiClient.Auth.AuthApiClient.OnLogout

Definition at line 77 of file AuthApiClient.cs.


The documentation for this class was generated from the following file:
  • C:/Users/prest/Desktop/GitHub/Ignivault/ignivault.ApiClient/Auth/AuthApiClient.cs