wip session auth
This commit is contained in:
parent
aa4394fd21
commit
7b6c155a73
23 changed files with 321 additions and 90 deletions
|
@ -2,9 +2,16 @@ using Femto.Modules.Auth.Models;
|
|||
|
||||
namespace Femto.Modules.Auth.Application.Dto;
|
||||
|
||||
public record Session(string SessionId, DateTimeOffset Expires)
|
||||
public record SessionDto(
|
||||
string SessionId,
|
||||
DateTimeOffset Expires,
|
||||
bool Weak,
|
||||
string? RememberMe = null
|
||||
)
|
||||
{
|
||||
internal Session(UserSession session) : this(session.Id, session.Expires)
|
||||
{
|
||||
}
|
||||
}
|
||||
internal SessionDto(Session session)
|
||||
: this(session.Id, session.Expires, !session.IsStronglyAuthenticated) { }
|
||||
|
||||
internal SessionDto(Session session, string? rememberMe)
|
||||
: this(session.Id, session.Expires, !session.IsStronglyAuthenticated, rememberMe) { }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue