PhoenixApiToolkit.TestHelpers.put_jwt

You're seeing just the function put_jwt, go back to PhoenixApiToolkit.TestHelpers module for more information.

Specs

put_jwt(Plug.Conn.t(), binary()) :: Plug.Conn.t()

Add JWT to the conn. A valid, signed JWT can be generated by gen_jwt/2.

Examples

use Plug.Test

iex> conn(:get, "/") |> put_jwt("my_jwt") |> get_req_header("authorization")
["Bearer: my_jwt"]