misc
This commit is contained in:
parent
fbc6f562e3
commit
d7e0c59559
31 changed files with 249 additions and 57 deletions
|
@ -1,3 +1,3 @@
|
|||
namespace Femto.Modules.Auth.Application.Dto;
|
||||
|
||||
public record LoginResult(Session Session, Guid UserId, string Username);
|
||||
public record LoginResult(Session Session, UserInfo User);
|
|
@ -1,3 +1,3 @@
|
|||
namespace Femto.Modules.Auth.Application.Dto;
|
||||
|
||||
public record RegisterResult(Session Session, Guid UserId, string Username);
|
||||
public record RegisterResult(Session Session, UserInfo User);
|
10
Femto.Modules.Auth/Application/Dto/SignupCodeDto.cs
Normal file
10
Femto.Modules.Auth/Application/Dto/SignupCodeDto.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
namespace Femto.Modules.Auth.Application.Dto;
|
||||
|
||||
public record SignupCodeDto(
|
||||
string Code,
|
||||
string Email,
|
||||
string Name,
|
||||
Guid? RedeemedByUserId,
|
||||
string? RedeemedByUsername,
|
||||
DateTimeOffset? ExpiresOn
|
||||
);
|
10
Femto.Modules.Auth/Application/Dto/UserInfo.cs
Normal file
10
Femto.Modules.Auth/Application/Dto/UserInfo.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using Femto.Modules.Auth.Contracts;
|
||||
using Femto.Modules.Auth.Models;
|
||||
|
||||
namespace Femto.Modules.Auth.Application.Dto;
|
||||
|
||||
public record UserInfo(Guid Id, string Username, ICollection<Role> Roles)
|
||||
{
|
||||
internal UserInfo(UserIdentity user)
|
||||
: this(user.Id, user.Username, user.Roles.Select(r => r.Role).ToList()) { }
|
||||
};
|
|
@ -1,3 +1,3 @@
|
|||
namespace Femto.Modules.Auth.Application.Dto;
|
||||
|
||||
public record ValidateSessionResult(Session Session, Guid UserId, string Username);
|
||||
public record ValidateSessionResult(Session Session, UserInfo User);
|
Loading…
Add table
Add a link
Reference in a new issue