API calls for all endpoints tagged Session.
Summary
Functions
Check if authentication is enabled Returns whether authentication is enabled and if the current token is valid.
Issue WebSocket ticket Issues a short-lived ticket for authenticating WebSocket connections. The ticket can be used as a query parameter when upgrading to WebSocket.
Login Authenticates a user and returns a session token. Sets a cookie with the session token for subsequent requests.
Logout Logs out the current user and invalidates the session token.
Functions
@spec is_auth_enabled( Tesla.Env.client(), keyword() ) :: {:ok, ExBifrost.Model.IsAuthEnabledResponse.t()} | {:ok, ExBifrost.Model.BifrostError.t()} | {:error, Tesla.Env.t()}
Check if authentication is enabled Returns whether authentication is enabled and if the current token is valid.
Parameters
connection(ExBifrost.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.IsAuthEnabledResponse.t}on success{:error, Tesla.Env.t}on failure
@spec issue_ws_ticket( Tesla.Env.client(), keyword() ) :: {:ok, ExBifrost.Model.IssueWsTicket200Response.t()} | {:ok, ExBifrost.Model.BifrostError.t()} | {:error, Tesla.Env.t()}
Issue WebSocket ticket Issues a short-lived ticket for authenticating WebSocket connections. The ticket can be used as a query parameter when upgrading to WebSocket.
Parameters
connection(ExBifrost.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.IssueWsTicket200Response.t}on success{:error, Tesla.Env.t}on failure
@spec login(Tesla.Env.client(), ExBifrost.Model.LoginRequest.t(), keyword()) :: {:ok, ExBifrost.Model.LoginResponse.t()} | {:ok, ExBifrost.Model.BifrostError.t()} | {:error, Tesla.Env.t()}
Login Authenticates a user and returns a session token. Sets a cookie with the session token for subsequent requests.
Parameters
connection(ExBifrost.Connection): Connection to serverlogin_request(LoginRequest):opts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.LoginResponse.t}on success{:error, Tesla.Env.t}on failure
@spec logout( Tesla.Env.client(), keyword() ) :: {:ok, ExBifrost.Model.Logout200Response.t()} | {:ok, ExBifrost.Model.BifrostError.t()} | {:error, Tesla.Env.t()}
Logout Logs out the current user and invalidates the session token.
Parameters
connection(ExBifrost.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, ExBifrost.Model.Logout200Response.t}on success{:error, Tesla.Env.t}on failure