Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.1 KiB

  1. using System;
  2. using System.Xml.Serialization;
  3. using Microsoft.Uddi;
  4. namespace Microsoft.Uddi.Authentication
  5. {
  6. /// <summary>
  7. /// The discard_authToken message is used to inform an Operator Site that the
  8. /// authentication token can be discarded. Subsequent calls that use the same
  9. /// authToken may be rejected. This message is optional for Operator Sites that
  10. /// do not manage session state or that do not support the get_authToken message.
  11. /// </summary>
  12. [XmlRootAttribute("discard_authToken", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace)]
  13. public class DiscardAuthToken : UddiSecureMessage
  14. {
  15. }
  16. /// <summary>
  17. /// The get_authToken message is used to obtain an authentication token.
  18. /// This message returns the authentication information that should be used
  19. /// in subsequent calls to the publishers API messages.
  20. /// </summary>
  21. [XmlRootAttribute("get_authToken", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace)]
  22. public class GetAuthToken : UddiMessage
  23. {
  24. private string userId;
  25. private string credentials;
  26. /// <summary>
  27. /// This required attribute argument is the user that an individual authorized user was assigned
  28. /// by an Operator Site. Operator Sites will each provide a way for individuals to obtain a
  29. /// UserID and password that will be valid only at the given Operator Site.
  30. /// </summary>
  31. [XmlAttribute("userID")]
  32. public string UserID
  33. {
  34. get { return userId; }
  35. set { userId = value; }
  36. }
  37. /// <summary>
  38. /// This required attribute argument is the password or credential that is associated with the user.
  39. /// </summary>
  40. [XmlAttribute("cred")]
  41. public string Credentials
  42. {
  43. //
  44. // TODO store this value using CryptProtectMemory
  45. //
  46. get { return credentials; }
  47. set { credentials = value; }
  48. }
  49. }
  50. /// <summary>
  51. /// The authToken message contains a single authInfo element that contains an access token
  52. /// that is to be passed back in all of the publisher API messages that change data. This
  53. /// message is always returned using SSL encryption as a synchronous response to the
  54. /// get_authToken message
  55. /// </summary>
  56. [XmlRootAttribute("authToken", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace)]
  57. public class AuthToken : UddiCore
  58. {
  59. private string node;
  60. private string authInfo;
  61. private GetAuthToken originatingGetAuthToken;
  62. [XmlAttribute("operator")]
  63. public string Operator
  64. {
  65. get { return node; }
  66. set { node = value; }
  67. }
  68. /// <summary>
  69. /// This element contains the requested authentication token. Authentication tokens are opaque
  70. /// values that are required for all other publisher API calls.
  71. /// </summary>
  72. [XmlElement("authInfo")]
  73. public string AuthInfo
  74. {
  75. get { return authInfo; }
  76. set { authInfo = value; }
  77. }
  78. [XmlIgnore]
  79. internal GetAuthToken OriginatingAuthToken
  80. {
  81. get { return originatingGetAuthToken; }
  82. set { originatingGetAuthToken = value; }
  83. }
  84. }
  85. }