Connection.Ticket (etl_core v0.1.54)

Module for working with access tickets

Link to this section 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.

Link to this section Functions

Link to this function

get(url, headers, username, password)

Returns a valid ticket, depending on the user.

parameters

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

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

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

Return:

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