An auth provider is a factory for authenticator instances (or objects matching that interface). Its #create_authenticator will be called once for each connection that requires authentication.

If the authentication requires keeping state, keep that in the authenticator instances, not in the auth provider.

Auth providers given to Cassandra.cluster don’t need to be subclasses of this class, but need to implement the same methods. This class exists only for documentation purposes.
Creating an authenticator must absolutely not block, or the whole connection process will block.
See Also:



Direct Known Subclasses



(authentication_class, host)

Create a new authenticator object. This method will be called once per connection that requires authentication. The auth provider can create different authenticators for different authentication classes, or return nil if it does not support the authentication class.

This method must absolutely not block.
Name Type Details
authentication_class String the authentication class used by the server.
host Host the node to whom we’re authenticating.
Type Details
(Auth::Authenticator or nil) an object with an interface matching Authenticator or nil if the authentication class is not supported.