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

should be possible to add hooks to the entire app, not just per-path #25

Closed
thedavidmeister opened this issue Mar 30, 2018 · 1 comment

Comments

@thedavidmeister
Copy link
Contributor

Not sure if this should be here or in https://github.com/degree9/featherscript but currently there only seems to be a way to add hooks per api endpoint as per meta.server/api.

Feathers itself allows for app-wide hooks, such as this example to ensure valid JWTs are always present:

(defn with-always-enforce-valid-jwt
 [app]
 (let [auth (:authenticate feathers.authentication/hooks)
       jwt-hook (auth. "jwt")]
  (.hooks app (clj->js {:before {:all [jwt-hook]}}))))
@burn2delete
Copy link
Member

Moving this request to degree9/featherscript#6

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

2 participants