farmbot v6.0.1-alpha 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

Functions

Authorizes with the farmbot api

Callbacks

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

Link to this section Types

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

Email used to configure this bot.

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

Password used to configure this bot.

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

Server used to configure this bot.

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

Token that was fetched with the credentials.

Link to this section Functions

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

Authorizes with the farmbot api.

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}