jwt icon indicating copy to clipboard operation
jwt copied to clipboard

How to obtain a JWT within PHP not using /jwt/token

Open ebremer opened this issue 6 years ago • 3 comments

I would like to obtain a JWT for a current user via a module, that I am writing, so that an external program can be launched that will process data and then return that data via the REST API. I would like to pass this external program the user's JWT so that when the data is posted back, it is "owned/created" by that user.

ebremer avatar Oct 24 '18 14:10 ebremer

I have basically the same need, and made a sketchy start on a module/submodule using RSA signatures. I will try to post to d.o

pwolanin avatar Oct 24 '18 14:10 pwolanin

Great thanks! I'm happy to test and give feedback. In my use case, I will be sending the JWT to a external java program via shell_exec. I would also like to send via drupal_http_request to external rest services that will use the JWT to "dial back" to the calling Drupal instance to validate and retrieve that particular user's access via the Drupal REST API.

ebremer avatar Oct 24 '18 14:10 ebremer

Created an issue on d.o, please discuss there https://www.drupal.org/project/jwt/issues/3013156

pwolanin avatar Nov 12 '18 17:11 pwolanin