Xandra v0.10.1 Xandra.Authenticator behaviour View Source
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.
Link to this section Summary
Callbacks
Returns an iodata that's used as the response body to Cassandra's auth challenge.
Link to this section Callbacks
Link to this callback
response_body(options) View Source
Returns an iodata that's used as the response body to Cassandra's auth challenge.