-
-
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.
Added SSO authentication with a FakeSSOAuthenticationProvider to prov…
…ide an example. #4
- Loading branch information
1 parent
81e6e3a
commit 5266d4a
Showing
86 changed files
with
2,704 additions
and
265 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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 |
---|---|---|
|
@@ -23,6 +23,11 @@ | |
"SenderProductName": "SaaStack", | ||
"SenderEmailAddress": "[email protected]", | ||
"SenderDisplayName": "Support" | ||
}, | ||
"SSOProvidersService": { | ||
"SSOUserTokens": { | ||
"AesSecret": "V7z5SZnhHRa7z68adsvazQjeIbSiWWcR+4KuAUikhe0=::u4ErEVotb170bM8qKWyT8A==" | ||
} | ||
} | ||
}, | ||
"Hosts": { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using Common; | ||
using Domain.Common.ValueObjects; | ||
using Domain.Interfaces; | ||
|
||
namespace Domain.Shared; | ||
|
||
public sealed class Address : ValueObjectBase<Address> | ||
{ | ||
public static readonly Address Default = Create(CountryCodes.Default).Value; | ||
|
||
public static Result<Address, Error> Create(string line1, string line2, string line3, string city, string state, | ||
CountryCodeIso3166 countryCode, string zip) | ||
{ | ||
return new Address(line1, line2, line3, city, state, countryCode, zip); | ||
} | ||
|
||
public static Result<Address, Error> Create(CountryCodeIso3166 countryCode) | ||
{ | ||
return new Address(countryCode); | ||
} | ||
|
||
private Address(CountryCodeIso3166 countryCode) : this(string.Empty, string.Empty, string.Empty, | ||
string.Empty, string.Empty, countryCode, string.Empty) | ||
{ | ||
} | ||
|
||
private Address(string? line1, string? line2, string? line3, string? city, string? state, | ||
CountryCodeIso3166 countryCode, string? zip) | ||
{ | ||
Line1 = line1; | ||
Line2 = line2; | ||
Line3 = line3; | ||
City = city; | ||
State = state; | ||
CountryCode = countryCode; | ||
Zip = zip; | ||
} | ||
|
||
public string? City { get; } | ||
|
||
public CountryCodeIso3166 CountryCode { get; } | ||
|
||
public string? Line1 { get; } | ||
|
||
public string? Line2 { get; } | ||
|
||
public string? Line3 { get; } | ||
|
||
public string? State { get; } | ||
|
||
public string? Zip { get; } | ||
|
||
public static ValueObjectFactory<Address> Rehydrate() | ||
{ | ||
return (property, _) => | ||
{ | ||
var parts = RehydrateToList(property, false); | ||
return new Address(parts[0], parts[1], parts[2], parts[3], parts[4], | ||
CountryCodes.FindOrDefault(parts[5]), | ||
parts[6]); | ||
}; | ||
} | ||
|
||
protected override IEnumerable<object?> GetAtomicValues() | ||
{ | ||
return new object?[] { Line1, Line2, Line3, City, State, CountryCode.Alpha3, Zip }; | ||
} | ||
} |
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,38 @@ | ||
using Common; | ||
using Common.Extensions; | ||
using Domain.Common.Extensions; | ||
using Domain.Common.ValueObjects; | ||
using Domain.Interfaces; | ||
using Domain.Interfaces.Validations; | ||
|
||
namespace Domain.Shared; | ||
|
||
public sealed class PhoneNumber : SingleValueObjectBase<PhoneNumber, string> | ||
{ | ||
public static Result<PhoneNumber, Error> Create(string phoneNumber) | ||
{ | ||
if (phoneNumber.IsNotValuedParameter(nameof(phoneNumber), out var error1)) | ||
{ | ||
return error1; | ||
} | ||
|
||
if (phoneNumber.IsInvalidParameter(CommonValidations.PhoneNumber, nameof(phoneNumber), | ||
Resources.PhoneNumber_InvalidPhoneNumber, out var error2)) | ||
{ | ||
return error2; | ||
} | ||
|
||
return new PhoneNumber(phoneNumber); | ||
} | ||
|
||
private PhoneNumber(string phoneNumber) : base(phoneNumber) | ||
{ | ||
} | ||
|
||
public string Number => Value; | ||
|
||
public static ValueObjectFactory<PhoneNumber> Rehydrate() | ||
{ | ||
return (property, _) => new PhoneNumber(property); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.