-
Notifications
You must be signed in to change notification settings - Fork 66
Using passort-jwt auth with osprey? #102
Comments
Hi! I'm using RAML and Osprey for one university project of mine. We decided to implement JWT-based authentication so I've been experimenting a bit during the last few days and I've faced the same problem. This is an example project I've produced, I hope it's useful for anyone wanting to use JWTs within Osprey. This is
And this is
As you can see passport-jwt is gracefully integrated. You can also specify some parameters within RAML specification. Sadly this implementation only allow tokens to be stored into the I really hope this could be useful to someone. I know it's poorly commented, if something is unclear just ask! |
ciao @gciatto , tks for the kick start with jwt. missing |
Prior to using osprey, I could use the
passport-jwt
plugin to require and validate a JSON Web Token for secure routes:Now that I'm using osprey to perform request validation, I would like to instead declare the security in RAML ... :
... and use
osprey.security(...)
to enforce it, but it's unclear to me how to covert my old code:Anybody have an idea on how to do this?
The text was updated successfully, but these errors were encountered: