Implement authentication via client credentials

Implement authentication via client credentials (for resource servers) when running under Node.js
wonky indentation in the 7 lines above