Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Request: add support for tokenKey #19

Closed
stephenlacy opened this issue Mar 30, 2017 · 5 comments
Closed

Request: add support for tokenKey #19

stephenlacy opened this issue Mar 30, 2017 · 5 comments

Comments

@stephenlacy
Copy link

Currently the JWT is added to the req.[requestKey].jwt.
I am requesting adding another option for setting the param jwt such as:

JWTSession({
  client: redis,
  secret: 'kat',
  requestKey: 'session',
  tokenKey: 'token'
})

// => req.session.token = JWT

I can send a PR to add the option along with tests.

@ricardogarim
Copy link

And if possible, add an option that keep the requestArg the same that was written (do not transform to 'x-some-thing' what was 'someThing'). What you think, @stevelacy?

@aembke
Copy link
Contributor

aembke commented Mar 31, 2017

That sounds like a good idea. I can shoot to get that added in the next week or so, or if you need it sooner feel free to submit a PR.

@aembke
Copy link
Contributor

aembke commented Mar 31, 2017

Was bored in a meeting, here's a PR that should take care of these.

#20

Feel free to give it a try on the feature branch and I'll push it to npm next week. I'm going to hold off on pushing it up for now pending some more complicated integration tests for the optional cookie support.

@aembke
Copy link
Contributor

aembke commented Mar 31, 2017

Now being tracked here: #21

@stephenlacy
Copy link
Author

I tried it out, seems to be working well, thanks

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

No branches or pull requests

3 participants