MongoExternalIdentity.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Copyright 2010-present MongoDB Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. using System;
  16. using System.Collections.Generic;
  17. using System.Linq;
  18. using System.Text;
  19. namespace MongoDB.Driver
  20. {
  21. /// <summary>
  22. /// Represents an identity defined outside of mongodb.
  23. /// </summary>
  24. public class MongoExternalIdentity : MongoIdentity
  25. {
  26. /// <summary>
  27. /// Initializes a new instance of the <see cref="MongoExternalIdentity" /> class.
  28. /// </summary>
  29. /// <param name="username">The username.</param>
  30. public MongoExternalIdentity(string username)
  31. : base("$external", username)
  32. { }
  33. /// <summary>
  34. /// Initializes a new instance of the <see cref="MongoExternalIdentity" /> class.
  35. /// </summary>
  36. /// <param name="source">The source.</param>
  37. /// <param name="username">The username.</param>
  38. public MongoExternalIdentity(string source, string username)
  39. : base(source, username)
  40. { }
  41. }
  42. }