Fakultas Ilmu Komputer UI

Commit 919b3f1a authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Turn create_token function to public

parent eef17449
......@@ -30,11 +30,12 @@ defmodule DiskuyWeb.Auth.Guardian do
password == encrypted_password
end
defp create_token(user) do
def create_token(user) do
{:ok, token, _claims} = encode_and_sign(user)
{:ok, user, token}
end
def check_authorized(user, id_entity) do
case user.id == id_entity do
true ->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment