public LocalParty(string domainName, string environmentName, string partyName, StandardKeysConfiguration keysConfiguration, IApplicationIdentityClock clock, IKeyStore?keyStore, TrustedPartyConfiguration?localConfiguration = null) : base(domainName, environmentName, partyName, localConfiguration) { Throw.CheckArgument(domainName != null && CoreApplicationIdentity.Builder.IsValidIdentifier(domainName)); Throw.CheckArgument(environmentName != null && (environmentName == "" || CoreApplicationIdentity.Builder.IsValidIdentifier(environmentName))); Throw.CheckArgument(partyName != null && Base64UrlHelper.IsBase64Url(partyName)); _keyExchangeRequired = new PerfectEventSender <KeyExchangeRequiredEventArgs>(); _remotes = new ConcurrentDictionary <string, RemoteParty>(); _exposed = _remotes.AsIReadOnlyDictionary <string, RemoteParty, IRemoteParty>(); KeyFactory = new KeyFactory(keysConfiguration, clock.Clock); KeyStore = keyStore; DomainName = domainName; EnvironmentName = environmentName; _appClock = clock; }
public KeyFactory(StandardKeysConfiguration configuration, ISystemClock clock) { Clock = clock; // The configuration is a clone. KeyConfig = configuration; }