Server Validation of a JWT

137 views
Skip to first unread message

Telmo Neves

unread,
Jan 11, 2017, 7:50:36 AM1/11/17
to Play Framework
Hi there.

After searching for this I can't find a good solution to solve this problem.

I want to validate a JWT token(or any other token) against the secret key at the server.

As play does not have the concept of middleware where can I do this? Can I use Deadbolt2 for authorization and validation?

Thanks

Will Sargent

unread,
Jan 11, 2017, 12:15:36 PM1/11/17
to play-fr...@googlegroups.com
Do you want something like http://pauldijou.fr/jwt-scala/ ?

--
Will Sargent
Engineer, Lightbend, Inc.


--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/82a1caf9-8bd6-4e9a-a8fa-148a0c503e02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Telmo Neves

unread,
Jan 11, 2017, 5:59:22 PM1/11/17
to Play Framework
Yea Thanks.

What is the correspondent of WrappedRequest in java, or there is an similar approach of this example in java?




On Wednesday, 11 January 2017 17:15:36 UTC, Will Sargent wrote:
Do you want something like http://pauldijou.fr/jwt-scala/ ?

--
Will Sargent
Engineer, Lightbend, Inc.


On Wed, Jan 11, 2017 at 4:49 AM, Telmo Neves <telmo....@gmail.com> wrote:
Hi there.

After searching for this I can't find a good solution to solve this problem.

I want to validate a JWT token(or any other token) against the secret key at the server.

As play does not have the concept of middleware where can I do this? Can I use Deadbolt2 for authorization and validation?

Thanks

--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.

henrym...@gmail.com

unread,
Apr 12, 2017, 4:08:43 PM4/12/17
to Play Framework
There is also pac4j: https://github.com/pac4j/play-pac4j

I haven't used the JWT functionality but it supports it (I am currently using the openid connect for a prototype and seems to work well).

I am actually wondering if anyone else in the list has tried JWT with pac4j. Thanks.

Franz

unread,
Nov 16, 2017, 12:38:57 PM11/16/17
to Play Framework
I also began searching for a JWT authentication thingie for my Play 2.6 (Java) project and decided to use one of the more popular libraries for verifying/decoding. I wrote a Play filter and a Controller helper to make it easy to use.

Reply all
Reply to author
Forward
0 new messages