Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent invocation of handler interceptors on using kekkonen operations #46

Open
metametadata opened this issue Dec 19, 2016 · 0 comments

Comments

@metametadata
Copy link

See https://github.com/metosin/kekkonen-sample/:

  1. Add a log into security/require-roles meta handler:
(defn require-roles [required]
  (fn [context]
    (println ">>>> require-roles") ; <----------
    (let [roles (-> context :user :roles)]
      (if (seq (set/intersection roles required))
        context))))
  1. Run app: $ lein repl, then (reset).
  2. Open Swagger UI in browser (http://localhost:3000)
  3. Try out kekkonen operations (http://localhost:3000/index.html#/kekkonen).
  4. See logs in REPL.

Actual:
Visiting Swagger UI hits the interceptor.
GET /kekkonen/handlers hits the interceptor.
GET /kekkonen/handler?kekkonen.action=api.admin%2Freset-counter! does not hit the interceptor.

Expected:
Both GET /kekkonen/handler and GET /kekkonen/handlers should consistently hit the handler's interceptors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant