mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 09:01:10 +00:00
Adds authentication integration tests
This commit is contained in:
1 parent
4f91f29b62
commit
6d7d2f3c32
13 files changed
+1690
-6
No files matched your search
@@ -42,12 +42,12 @@ public class UserEntity : IStorageEntity
|
||||
/// <summary>
|
||||
/// Gets or sets the optional token used for account verification or password reset.
|
||||
/// </summary>
|
||||
public string? VerificationToken { get; set; }
|
||||
public string? VerificationToken { get; set; } // TODO: to be deleted, not used
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the optional date and time when the verification token was created.
|
||||
/// </summary>
|
||||
public DateTime? VerificationTokenCreated { get; set; }
|
||||
public DateTime? VerificationTokenCreated { get; set; } // TODO: to be deleted, not used
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date and time when the temporary password used in password recovery was created.
|
||||
|
||||
+1
-1
@@ -50,6 +50,6 @@ public class SetupApplicationEndpoint : BaseEndpoint<RegistrationRequest, IResul
|
||||
public override async Task<IResult> ExecuteAsync(RegistrationRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<RegistrationResponse> result = await _sender.Send(request.ToSetupCommand(), cancellationToken).ConfigureAwait(false);
|
||||
return result.Match(success => TypedResults.Created($"{BaseURL}api/v1{Api.Common.Routes.UsersManagement.ApiRoutes.Users.GET_USER_BY_ID}/{result.Value.Id}", result.Value), Problem);
|
||||
return result.Match(success => TypedResults.Created($"{BaseURL}api/v1{Api.Common.Routes.UsersManagement.ApiRoutes.Users.GET_USER_BY_ID.Replace("{id}", success.Id.ToString())}", result.Value), Problem);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -50,6 +50,6 @@ public class RegisterEndpoint : BaseEndpoint<RegistrationRequest, IResult>
|
||||
public override async Task<IResult> ExecuteAsync(RegistrationRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
ErrorOr<RegistrationResponse> result = await _sender.Send(request.ToCommand(), cancellationToken).ConfigureAwait(false);
|
||||
return result.Match(success => TypedResults.Created($"{BaseURL}api/v1{ApiRoutes.Users.GET_USER_BY_ID}/{result.Value.Id}", result.Value), Problem);
|
||||
return result.Match(success => TypedResults.Created($"{BaseURL}api/v1{ApiRoutes.Users.GET_USER_BY_ID.Replace("{id}", success.Id.ToString())}", result.Value), Problem);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user