-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use options pattern for magic links and application overrides (#613)
- Loading branch information
1 parent
04440ec
commit 4e8eb5c
Showing
7 changed files
with
41 additions
and
37 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
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 was deleted.
Oops, something went wrong.
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,15 @@ | ||
namespace Passwordless.Common.Overrides; | ||
|
||
public class ApplicationOverridesOptions : Dictionary<string, ApplicationOverrides> | ||
{ | ||
/// <summary> | ||
/// Gets the application overrides for the specified tenant. If the application is not found, an instance with | ||
/// default values is returned. | ||
/// </summary> | ||
/// <param name="tenant"></param> | ||
/// <returns></returns> | ||
public ApplicationOverrides GetApplication(string tenant) | ||
{ | ||
return this.TryGetValue(tenant, out var overrides) ? overrides : new ApplicationOverrides(); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Passwordless.Service.MagicLinks; | ||
|
||
public class MagicLinksOptions | ||
{ | ||
public TimeSpan NewAccountTimeout { get; set; } = TimeSpan.FromHours(24); | ||
} |