-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding TTL to AuthenticationOptions (#121)
* added TimeToLive to MGAT AuthenticationOptions. --------- Co-authored-by: Oleksii Holub <[email protected]>
- Loading branch information
1 parent
769a423
commit 6a01e85
Showing
5 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace Passwordless.Helpers.Extensions; | ||
|
||
internal static class FunctionalExtensions | ||
{ | ||
internal static TOut Pipe<TIn, TOut>(this TIn input, Func<TIn, TOut> transform) => transform(input); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
using System; | ||
|
||
namespace Passwordless.Models; | ||
|
||
public record AuthenticationOptions(string UserId); | ||
/// <summary> | ||
/// Used to manually generate an authentication token. | ||
/// </summary> | ||
/// <param name="UserId">User identifier the token is intended for.</param> | ||
/// <param name="TimeToLive">Optional. How long a token is valid for. Default value is 15 minutes.</param> | ||
public record AuthenticationOptions(string UserId, TimeSpan? TimeToLive = null); | ||
|
||
internal record AuthenticationOptionsRequest(string UserId, int? TimeToLive = null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters