[CSHARP-2318] Add static factory methods for creating SCRAM credentials Created: 29/Jun/18  Updated: 31/Mar/22

Status: Backlog
Project: C# Driver
Component/s: API
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Vincent Kam (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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")); 

 


Generated at Wed Feb 07 21:42:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.