View Source Eli (eli v0.1.0)
Documentation for Eli
.
Summary
Functions
Returns the current user data.
Refresh your token session returning a new session token.
Sign in.
Signs user out closing and deleting session.
Unlocks user for making the he/she able to sign in again.
Functions
Returns the current user data.
Examples
iex> Eli.signed_in("JWT session token")
:signed_in
200
%{
"data" => %{
"active" => true,
"email" => "adilsonchacon@gmail.com",
"id" => "732cf1c2-6299-41fa-8784-e458765743b7",
"language" => "en",
"name" => "Adilson Chacon",
"timezone" => "Europe/London"
}
}
404
%{"errors" => %{"detail" => "Not Found"}},
Refresh your token session returning a new session token.
Examples
iex> Eli.refresh("JWT session token")
200
%{
"data" => %{
"token" => "JWT session token"
}
}
404
%{"errors" => %{"detail" => "Not Found"}},
Sign in.
Examples
iex> Eli.sign_in("app token", "user.email@domain.com", "secret.password")
200
%{
"data" => %{
"token" => "JWT session token"
}
}
400
%{"errors" => %{"detail" => "invalid credentials"}},
Signs user out closing and deleting session.
Examples
iex> Eli.sign_out("JWT session token")
200
%{"data" => %{"message" => "signed out successfully"}}
404
%{"errors" => %{"detail" => "Not Found"}}
Unlocks user for making the he/she able to sign in again.
Examples
iex> Eli.unlock("Unlock token")
200
%{"data" => %{"message" => "account was successfully unlocked"}}
404
%{"errors" => %{"detail" => "Not Found"}}