Class PlainTextAuthProvider
A simple IAuthProvider implementation.
This provider allows to programmatically define authentication information that will then apply to all hosts. The PlainTextAuthenticator instances it returns support SASL authentication using the PLAIN mechanism for version 2 or above of the CQL native protocol.
Inheritance
object
PlainTextAuthProvider
Implements
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cassandra
Assembly: Cassandra.dll
Syntax
public class PlainTextAuthProvider : IAuthProvider
Constructors
PlainTextAuthProvider(string, string)
Creates a new simple authentication information provider with the supplied credentials.
Declaration
public PlainTextAuthProvider(string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | username | to use for authentication requests |
string | password | to use for authentication requests |
Methods
NewAuthenticator(IPEndPoint)
Uses the supplied credentials and the SASL PLAIN mechanism to login to the server.
Declaration
public IAuthenticator NewAuthenticator(IPEndPoint host)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | host | the Cassandra host with which we want to authenticate |
Returns
Type | Description |
---|---|
IAuthenticator | An Authenticator instance which can be used to perform authentication negotiations on behalf of the client. |