Class DseGssapiAuthProvider
Provides GSSAPI 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 DseGssapiAuthProvider : IAuthProvider
Constructors
DseGssapiAuthProvider(string, Func<IPEndPoint, string>)
Creates a new instance of DseGssapiAuthProvider.
Declaration
public DseGssapiAuthProvider(string service = "dse", Func<IPEndPoint, string> hostNameResolver = null)
Parameters
Type | Name | Description |
---|---|---|
string | service | Name of the service. Defaults to "dse" |
Func<IPEndPoint, string> | hostNameResolver | Method to resolve the host name given the endpoint. Defaults to UseIpResolver(IPEndPoint). |
Methods
NewAuthenticator(IPEndPoint)
Returns a new IAuthenticator instance to handle authentication for a given endpoint.
Declaration
public IAuthenticator NewAuthenticator(IPEndPoint host)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | host |
Returns
Type | Description |
---|---|
IAuthenticator |
Exceptions
Type | Condition |
---|---|
AuthenticationException | When the host name can not be resolved. |
ReverseDnsResolver(IPEndPoint)
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to a hostname.
Declaration
public static string ReverseDnsResolver(IPEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | endpoint |
Returns
Type | Description |
---|---|
string |
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 |
UseIpResolver(IPEndPoint)
Returns the IP address of the endpoint as a string.
Declaration
public static string UseIpResolver(IPEndPoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | endpoint |
Returns
Type | Description |
---|---|
string |