ChannelCredentialsConfiguratorBase.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #region Copyright notice and license
  2. // Copyright 2019 The gRPC Authors
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. #endregion
  16. using System.Collections.Generic;
  17. namespace Grpc.Core
  18. {
  19. /// <summary>
  20. /// Base class for objects that can consume configuration from <c>CallCredentials</c> objects.
  21. /// Note: experimental API that can change or be removed without any prior notice.
  22. /// </summary>
  23. public abstract class ChannelCredentialsConfiguratorBase
  24. {
  25. /// <summary>
  26. /// Configures the credentials to use insecure credentials.
  27. /// </summary>
  28. public abstract void SetInsecureCredentials(object state);
  29. /// <summary>
  30. /// Configures the credentials to use <c>SslCredentials</c>.
  31. /// </summary>
  32. public abstract void SetSslCredentials(object state, string rootCertificates, KeyCertificatePair keyCertificatePair, VerifyPeerCallback verifyPeerCallback);
  33. /// <summary>
  34. /// Configures the credentials to use composite channel credentials (a composite of channel credentials and call credentials).
  35. /// </summary>
  36. public abstract void SetCompositeCredentials(object state, ChannelCredentials channelCredentials, CallCredentials callCredentials);
  37. }
  38. }