public ClientCredentialsAccessTokenFactory(ClientCredentailsAccessTokenFactoryOptions options, BearerHttpClientFactory <TRef> next)
        {
            if (options.ExpirationTimeFraction < 0.0d || options.ExpirationTimeFraction > 1.0d)
            {
                throw new InvalidOperationException($"The specified ExpirationTimeFraction is not between 0 and 1.");
            }

            this.options = options;
            this.next    = next;
        }
 /// <summary>
 /// Copy any settings from this class to the passed in options. Any setttings that are null
 /// will be copied onto the options.
 /// </summary>
 /// <param name="clientCredentails">The target object.</param>
 public void MergeWith(ClientCredentailsAccessTokenFactoryOptions clientCredentails)
 {
     clientCredentails.IdServerHost = clientCredentails.IdServerHost ?? this.IdServerHost;
     clientCredentails.ClientId     = clientCredentails.ClientId ?? this.ClientId;
     clientCredentails.ClientSecret = clientCredentails.ClientSecret ?? this.ClientSecret;
 }