Authentication sessions in gRPC

1,854 views
Skip to first unread message

shikhach...@gmail.com

unread,
Jan 24, 2016, 12:34:34 PM1/24/16
to grpc.io
Hey , 

Can someone please share about auth sessions : 
- Can i maintain some authentication sessions like a web server in gRPC?
- Like a web server provides a "session token" once we successfully crosses the username/password step & this token remains valid for a certain amount of time(i.e the session duration)

-Shikha

kelsey.h...@gmail.com

unread,
Jan 26, 2016, 1:54:41 AM1/26/16
to grpc.io, shikhach...@gmail.com
While I'm not using sessions in the following example, it's totally possible to to accomplish what you are trying to do. The following link demonstrates how I'm handling validation of JWT tokens on the server side:


Next, the following demonstrates how I'm passing in a JWT token from the client:

In order to get JWT working I had implement the gRPC credentials.Credentials interface and use it from the client linked above.

Hope this helps.
 

-Shikha

shikhach...@gmail.com

unread,
Jan 26, 2016, 9:58:10 AM1/26/16
to grpc.io, shikhach...@gmail.com, kelsey.h...@gmail.com
Hey , 

Thanks a lot  but i am not using Oauth2. I am not aware about the Oauth2 details but i think JWT tokens are used in Oauth2 mechanism. These token are limited in time.
Could you share some support for sessions around simple username/password type mechanism ?

-Shikha

Masood Malekghassemi

unread,
Jan 26, 2016, 7:27:43 PM1/26/16
to grpc.io, shikhach...@gmail.com, kelsey.h...@gmail.com
I'm confused - didn't you ask for having a session duration in the opening question?

shikhach...@gmail.com

unread,
Jan 26, 2016, 11:40:19 PM1/26/16
to grpc.io, shikhach...@gmail.com, kelsey.h...@gmail.com
Yup , your are right , the question was around sessions only.
But i am not using Oauth2/JWT tokens. Kind of basic auth (username/password) i am trying to find out in gRPC. 
Basic auth gives a session token once we crosses the username/password step.
Can you guys suggest some relevant docs or link ?


-Shikha
Reply all
Reply to author
Forward
0 new messages