Hello,
I just got the things working.
Just that I am using pyramid_jwt and found that my data goes in the sub
dictionary of payload.
Can I have the data be a dictionary inside the payload itself?
I don't want tu use the sub or inside payload.
Happy hacking.
Krishnakant.
On Wednesday 03 February 2016 06:27 PM, Krishnakant wrote:
Hi Vincent,
My case is very simple.
I will be taking user's login and password for a certain organization.
Uising this data I will check if the user is valid e.g if password is
correct or not.
And secondly what status the user has (1 is admin, 0 is manager and -1
is guest).
So the user id and status will be part of my token payload.
Every time user sends request after this process, I will read the
authorization header and read the token.
If I get the id I will compare if it exists in database and also check
if the status mentioned in the token is correct.
If yes then next part of the code will execute
Do I need any thing complex for such a thing?
Or just reading the request header give me the id and status?
Happy hacking.
Krishnakant.
On Wednesday 03 February 2016 11:10 AM, Vincent Catalano wrote:
Krishnakant,
If you want to use the JWT functionality with Pyramid, I suggest
getting aquainted a bit more with the Pyramid's Authorization and
Authentication policies
(http://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/wiki/authorization.html).
The advantage of the pyramid_jwt library is that you shouldn't need
to access any headers to check validation, that is all handled for you.
On Tue, Feb 2, 2016 at 11:16 AM, Krishnakant <[email protected]
<mailto:[email protected]>> wrote:
Hi Vincent,
On Tuesday 02 February 2016 09:38 PM, Vincent Catalano wrote:
pyramid_jwt is an implementation of JWT for Pyramid where
python_jwt is a Python library for JWT. The advantages of using
pyramid_jwt is that it integrates JWT with Pyramid's
authorization and authentication functionality, meaning less
work for you. Depending on what you're trying to do, you could
just set and read the headers within a request; there is nothing
preventing your from doing that.
Oh, can I really,
So let's say I just want to access the authentication header from
request and get the token to just see if all is well and if user
data is correct, can I just do that?
Can you give me a small snippit?
Thanks a lot for this pointer.
Happy hacking.
Krishnakant.
On Tue, Feb 2, 2016 at 5:53 AM, Krishnakant
<[email protected]> wrote:
Hello all,
I wish to know the difference between python_jwt and
pyramid_jwt.
ARe they in any way dependent?
What will be the direct advantage of using pyramid_jwt?
Can I just set the headers and then read it from the request
object?
Happy hacking.
Krishnakant.
--
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to
[email protected].
To post to this group, send email to
[email protected].
Visit this group at
https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.
--
Vincent Catalano
Software Engineer and Web Developer,
(520).603.8944 <tel:%28520%29.603.8944>
--
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected].
To post to this group, send email to
[email protected].
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.
--
Vincent Catalano
Software Engineer and Web Developer,
(520).603.8944
--
You received this message because you are subscribed to the Google
Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.