   @doc """
   After the JWT is generated, stores the various fields of it in the DB for tracking
   """
-  def after_encode_and_sign(_resource, _type, claims, jwt) do
+  def after_encode_and_sign(resource, type, claims, jwt) do
     case Token.create!(claims, jwt) do
       {:error, _} -> {:error, :token_storage_failure}
-      _           -> :ok
+      _           -> {:ok, {resource, type, claims, jwt}}
     end
   end
 

    model = Token.find_by_claims(claims)
    if model do
      case repo.delete(model) do
        { :error, _ } -> { :error, :could_not_revoke_token }
        nil -> { :error, :could_not_revoke_token }
        _ -> { :ok, { claims, jwt } }
        end
    else
      { :ok, { claims, jwt } }
    end
  end


  """
  def on_verify(claims, jwt) do
    case Token.find_by_claims(claims) do
      nil    -> {:error, :token_not_found}
      _token -> {:ok, {claims, jwt}}
    end
  end

