Express.js

Manipulating JSON Web Tokens (JWTs)

I’ve been writing a couple of web services lately that use Auth0 for identity management. It’s a great platform that makes working with different identity providers a breeze. One thing that I couldn’t work out how to do at first was to quickly build a new JWT1 from an existing token. I wanted to take my current token, add some more data to it and return it to the user. So here’s a ‘why’ and ‘how’.
Read more

Node.js and Express - Strange Http Status Codes

In a Nutshell Sending a response in Express with a call like res.send(status, body) will send body as the status code if it is numeric - ignoring status. This is due to a fudge for backwards compatibility. The Details As part of a project I'm working on, I'm writing a service using node.jsand Express. This service exposes some entities in a MongoDB database through a REST API. Typically I hit this API through client-side Javascript, but in some places I want to hit the same API from some C# code - and I don't want to have to create classes for everything.
Read more