SecurityContext.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Copyright (C) 2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Net;
  10. using SMBLibrary.Authentication.GSSAPI;
  11. namespace SMBLibrary
  12. {
  13. public class SecurityContext
  14. {
  15. private string m_userName;
  16. private string m_machineName;
  17. private IPEndPoint m_clientEndPoint;
  18. public GSSContext AuthenticationContext;
  19. public object AccessToken;
  20. public SecurityContext(string userName, string machineName, IPEndPoint clientEndPoint, GSSContext authenticationContext, object accessToken)
  21. {
  22. m_userName = userName;
  23. m_machineName = machineName;
  24. m_clientEndPoint = clientEndPoint;
  25. AuthenticationContext = authenticationContext;
  26. AccessToken = accessToken;
  27. }
  28. public string UserName
  29. {
  30. get
  31. {
  32. return m_userName;
  33. }
  34. }
  35. public string MachineName
  36. {
  37. get
  38. {
  39. return m_machineName;
  40. }
  41. }
  42. public IPEndPoint ClientEndPoint
  43. {
  44. get
  45. {
  46. return m_clientEndPoint;
  47. }
  48. }
  49. }
  50. }