farmbot v6.4.1 Farmbot.Bootstrap.Authorization behaviour View Source

Functionality responsible for getting a JWT.

Link to this section Summary

Types

Email used to configure this bot

Password used to configure this bot

Server used to configure this bot

Token that was fetched with the credentials

Callbacks

Callback for an authorization implementation. Should return {:ok, token} | {:error, term}

Link to this section Types

Email used to configure this bot.

Link to this type password() View Source
password() :: binary()

Password used to configure this bot.

Server used to configure this bot.

Token that was fetched with the credentials.

Link to this section Functions

Link to this function authorize(email, pw_or_secret, server) View Source

Authorizes with the farmbot api.

Link to this function authorize_with_password(email, password, server) View Source
Link to this function authorize_with_secret(email, secret, server, state \\ %{backoff: 5000, logged_once: false}) View Source
Link to this function build_payload(email, password, rsa_key) View Source
Link to this function request_token(server, payload) View Source

Link to this section Callbacks

Link to this callback authorize(email, password, server) View Source
authorize(email(), password(), server()) :: {:ok, token()} | {:error, term()}

Callback for an authorization implementation. Should return {:ok, token} | {:error, term}