public StsAuthenticationHandler(Configuration.PackageSource packageSource, TokenStore tokenStore, Func <string, string, string> tokenFactory) { if (packageSource == null) { throw new ArgumentNullException(nameof(packageSource)); } _baseUri = packageSource.SourceUri; if (tokenStore == null) { throw new ArgumentNullException(nameof(tokenStore)); } _tokenStore = tokenStore; if (tokenFactory == null) { throw new ArgumentNullException(nameof(tokenFactory)); } _tokenFactory = tokenFactory; }
public StsAuthenticationHandler(Configuration.PackageSource packageSource, TokenStore tokenStore) : this(packageSource, tokenStore, tokenFactory : (endpoint, realm) => AcquireSTSToken(endpoint, realm)) { }