尝试使用 compojure auth 中间件 运行 Cloverage 时出现异常
Exception when attempting to run Cloverage with compojure auth middleware
在我将基于角色的身份验证添加到我的计算机后,Cloverage 现在失败了 api。虽然 运行 lein cloverage
我得到这个异常:
Exception in thread "main" java.lang.IllegalArgumentException: No method in multimethod 'restructure-param' for dispatch value: :auth-roles, compiling:(/private/var/folders/w_/yt926bqs21g44f257yz05ctsjbv948/T/form-init3368607975292148784.clj:1:125)
这是我的授权中间件:
(defmethod compojure.api.meta/restructure-param :auth-roles
[_ required-roles acc]
(update-in acc [:middleware] conj [require-roles required-roles]))
请参阅 github 问题:https://github.com/cloverage/cloverage/issues/164#issuecomment-281673566
(defmethod compojure.api.meta/restructure-param :auth-roles
[_ required-roles acc]
(update-in acc [:middleware] conj [`require-roles required-roles]))
在我将基于角色的身份验证添加到我的计算机后,Cloverage 现在失败了 api。虽然 运行 lein cloverage
我得到这个异常:
Exception in thread "main" java.lang.IllegalArgumentException: No method in multimethod 'restructure-param' for dispatch value: :auth-roles, compiling:(/private/var/folders/w_/yt926bqs21g44f257yz05ctsjbv948/T/form-init3368607975292148784.clj:1:125)
这是我的授权中间件:
(defmethod compojure.api.meta/restructure-param :auth-roles
[_ required-roles acc]
(update-in acc [:middleware] conj [require-roles required-roles]))
请参阅 github 问题:https://github.com/cloverage/cloverage/issues/164#issuecomment-281673566
(defmethod compojure.api.meta/restructure-param :auth-roles
[_ required-roles acc]
(update-in acc [:middleware] conj [`require-roles required-roles]))