Xandra v0.7.0 Xandra.Authenticator behaviour

A behaviour module for implementing a Cassandra authenticator.

Examples

defmodule MyAuthenticator do

@behaviour Xandra.Authenticator

def response_body(options) do
  ["user:", Keyword.fetch!(options, :user), "_password:", Keyword.fetch!(options, :password)]
end

end

To use the authenticator defined above:

Xandra.start_link(authentication: {MyAuthenticator, user: “foo”, password: “bar”})

Xandra supports Cassandra’s PasswordAuthenticator by default, see Xandra.Authenticator.Password for more information.

Summary

Callbacks

Returns an iodata that’s used as the response body to Cassandra’s auth challenge

Callbacks

response_body(arg0)
response_body(Keyword.t) :: iodata

Returns an iodata that’s used as the response body to Cassandra’s auth challenge.