 defmodule Joken do
   alias Joken.Token
+  alias Joken.Utils
 
   @type algorithm :: :HS256 | :HS384 | :HS512
   @type status :: :ok | :error


  @spec decode(String.t, payload) :: { status, map | String.t }
  def decode(jwt, claims \\ %{}) do
    secret_key =  Application.get_env(:joken, :secret_key)
    json_module = Application.get_env(:joken, :json_module)
    algorithm =   Application.get_env(:joken, :algorithm, :HS256)

    Token.decode(secret_key, json_module, jwt, algorithm, claims)
  end
  
end

  @spec encode(payload, payload) :: { status, String.t }
  def encode(payload, claims \\ %{}) do
    json_module = Application.get_env(:joken, :json_module)
    algorithm =   Application.get_env(:joken, :algorithm, :HS256)

