Class DsePlainTextAuthProvider
AuthProvider that provides plain text authenticator instances for clients to connect to DSE clusters secured with the DseAuthenticator.
Implements
Inherited Members
Namespace: Cassandra.DataStax.Auth
Assembly: Cassandra.dll
Syntax
public class DsePlainTextAuthProvider : IAuthProvider
Examples
Creating a auth-enabled Cluster instance:
var cluster = Cluster.Builder()
.AddContactPoint(h1)
.WithAuthProvider(new DsePlainTextAuthProvider("user", "p@sword1"))
.Build();
Constructors
DsePlainTextAuthProvider(string, string)
Creates a new instance of DsePlainTextAuthProvider.
Declaration
public DsePlainTextAuthProvider(string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | username | A not |
string | password | A not |
DsePlainTextAuthProvider(string, string, string)
Creates a new instance of DsePlainTextAuthProvider, enabling proxy authentication.
Declaration
public DsePlainTextAuthProvider(string username, string password, string authorizationId)
Parameters
Type | Name | Description |
---|---|---|
string | username | A not |
string | password | A not |
string | authorizationId | The optional authorization ID. Providing an authorization ID allows the currently authenticated user to act as a different user (a.k.a. proxy authentication). |
Methods
NewAuthenticator(IPEndPoint)
The IAuthenticator to use when connecting to host.
Declaration
public IAuthenticator NewAuthenticator(IPEndPoint host)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | host | The Cassandra host to connect to. |
Returns
Type | Description |
---|---|
IAuthenticator | The authentication instance to use. |
SetName(string)
Sets the authenticator name from Cassandra.
This method is guaranteed to be called before NewAuthenticator(IPEndPoint).
Declaration
public void SetName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |