-
-
Save samdvr/2a6a0ddfab1a658d18319fce540a224d to your computer and use it in GitHub Desktop.
test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def kab(conn, %{"token" => token}) do | |
case ApiTrangell.Guardian.decode_and_verify(token) do | |
{:ok,claims} -> json conn, %Person{token: "test for test"} | |
{:error, any} -> conn | |
|> put_status(403) | |
|> json %{ error: "unauthorized"} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment