java - JWT JAAS - how to get the JWT in WebSocket header? -


i writing custom jaas module authenticate users using json web tokens (jwts). users connect 3rd party application on websockets, , app supports custom jaas modules.

i've no idea how retrieve jwt token application. passed along header, don't know how retrieve using jaas api.

surely can access client has passed on , use authenticate? i'm thinking there should someway retrieve arbitrary headers on subject has request access application?

so after spending more time jaas, here how issue solved:

jaas not allow me access (arbitrary) protocol header contains jwt. however, note using mqtt on wss, , mqtt connect packet has "username" , "password" field. jwt can passed password (regarding seeming hacky, authentication token is kind of password). jaas provides api retrieve password user has requested auth, regardless of underlying protocol used send user's auth data.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -