Skip to content
Advertisement

Tag: node.js

Generate a Paseto V2 Public Key/Token in PHP, Verify in Node.js

Preface: What is Paseto?: https://developer.okta.com/blog/2019/10/17/a-thorough-introduction-to-paseto I am using the PHP library for Paseto from here I am using the Node.js Paseto lib from here I have been able to successfully achieve the creation of a Paseto V1 token and corresponding public key using the PHP lib (with a RSA private key on the server side for keypair), and then use

PHP’s openssl_sign Equivalent in Node JS

I am (slowly) learning Node JS and trying to use it in place of a PHP script I have. I need to sign a string I have assembled with SSL to pass on to a curl request. In PHP, this is how I’ve done it: So I’m trying to generate the evuivalent of $signed_signature, but I’m not sure how to

Send Post request to Node.js with PHP cURL

I am trying to send a post request through PHP cURL to my node.js server to then emit a message to the client. The server is working and setup as follows: and my PHP is as follows: The console says that json.message is undefined. Why is it undefined? Answer You’re using querystring.stringify() incorrectly. See the documentation on querystring’s methods here:

Advertisement