Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2318

Add static factory methods for creating SCRAM credentials

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • API
    • None

    Description

      Currently, we have static factory methods in {MongoCredential} for creating various types of credentials, but we don't have any for SCRAM-SHA-1 or SCRAM-SHA-256. It would be nice to have a friendly and consistent way of creating MongoCredentials. If one wishes to create a SCRAM credential, the current options are: 

       

      var credential1 = MongoCredential.CreateCredential("authSource","user","password"); // let the default authenticator sort it out
      var credential2 = new MongoCredential(
       "SCRAM-SHA-256", // manually specify scram sha (1/256) version
       new MongoInternalIdentity("authSource", "user"), 
       new PasswordEvidence("password")); 
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            vincent.kam@mongodb.com Vincent Kam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: