remember me
This commit is contained in:
parent
dac3acfecf
commit
8629883f88
10 changed files with 278 additions and 96 deletions
18
Femto.Modules.Auth/Application/Dto/RememberMeToken.cs
Normal file
18
Femto.Modules.Auth/Application/Dto/RememberMeToken.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using Femto.Modules.Auth.Models;
|
||||
|
||||
namespace Femto.Modules.Auth.Application.Dto;
|
||||
|
||||
public record RememberMeToken(string Selector, string Verifier)
|
||||
{
|
||||
public static RememberMeToken FromCode(string code)
|
||||
{
|
||||
var parts = code.Split('.');
|
||||
return new RememberMeToken(parts[0], parts[1]);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
public record NewRememberMeToken(string Selector, string Verifier, DateTimeOffset Expires)
|
||||
{
|
||||
public string Code => $"{Selector}.{Verifier}";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue