Connection.Ticket (etl_core v0.1.55)

Module for working with access tickets

Summary

Functions

Returns a valid ticket, depending on the user.

Store a valid ticket, depending on the user. By default, the generic user is considered.

Functions

Link to this function

get(url, headers, username, password)

Returns a valid ticket, depending on the user.

Parameters:

- url: String. Url to consult. It is assumed that the url contains 2 parameters to replace them: <username>, <password>.

- headers: List.

- username: String. Username.

- password: String. Password.

# - folder: String. Folder path to store the ticket.

Return:

- {Atom, String} | Exception . The atom can take the values: ok or error. The string will be the ticket or the error message.
Link to this function

refresh(url, headers, username, password, folder \\ "./tmp")

Store a valid ticket, depending on the user. By default, the generic user is considered.

Parameters:

- url: String. Url to consult. It is assumed that the url contains 2 parameters to replace them: <username>, <password>.

- headers: List.

- username: String. Username.

- password: String. Password.

- folder: String. Folder path to store the ticket.

Return:

- {:ok, ticket (String)} | {:error, error_msg (String)}