Username and password based authentication
Note
The article is being updated.
Below are examples of the code for authentication based on a username and token in different YDB SDKs.
C++
auto driverConfig = NYdb::TDriverConfig()
.SetEndpoint(endpoint)
.SetDatabase(database)
.SetCredentialsProviderFactory(NYdb::CreateLoginCredentialsProviderFactory({
.User = "user",
.Password = "password",
}));
NYdb::TDriver driver(driverConfig);