IConnectionInfo.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Collections.Generic;
  2. using System.Text;
  3. using Renci.SshNet.Messages.Authentication;
  4. namespace Renci.SshNet
  5. {
  6. /// <summary>
  7. /// Represents remote connection information.
  8. /// </summary>
  9. internal interface IConnectionInfo
  10. {
  11. /// <summary>
  12. /// Gets the character encoding.
  13. /// </summary>
  14. /// <value>
  15. /// The character encoding.
  16. /// </value>
  17. Encoding Encoding { get; }
  18. /// <summary>
  19. /// Gets the supported authentication methods for this connection.
  20. /// </summary>
  21. /// <value>
  22. /// The supported authentication methods for this connection.
  23. /// </value>
  24. IEnumerable<IAuthenticationMethod> AuthenticationMethods { get; }
  25. /// <summary>
  26. /// Signals that an authentication banner message was received from the server.
  27. /// </summary>
  28. /// <param name="sender">The session in which the banner message was received.</param>
  29. /// <param name="e">The banner message.{</param>
  30. void UserAuthenticationBannerReceived(object sender, MessageEventArgs<BannerMessage> e);
  31. /// <summary>
  32. /// Creates a <see cref="NoneAuthenticationMethod"/> for the credentials represented
  33. /// by the current <see cref="IConnectionInfo"/>.
  34. /// </summary>
  35. /// <returns>
  36. /// A <see cref="NoneAuthenticationMethod"/> for the credentials represented by the
  37. /// current <see cref="IConnectionInfo"/>.
  38. /// </returns>
  39. IAuthenticationMethod CreateNoneAuthenticationMethod();
  40. }
  41. }