Astra.Auth (astra v0.5.0)

Provides functions to access the public methods of the Astra Auth API for databases hosted on https://astra.datastax.com.

Link to this section Summary

Functions

Get a fresh auth token from Astra. Automatically called by the TokenManager app

Link to this section Functions

Link to this function

authorize_user(username, password)

Specs

authorize_user(String, String) :: {Atom, Map}

Get a fresh auth token from Astra. Automatically called by the TokenManager app

Parameters

  • username: Astra database user name
  • password: password for the user

Examples

  > Astra.Auth.authorize_user("operator", "bad_password!")
  {:ok, %{authToken: "3f9d03af-e29d-40d5-9fe1-c77a2ff6a40a"}}