Skip to content

Instantly share code, notes, and snippets.

View rajesh-vi's full-sized avatar

Rajesh Meniya rajesh-vi

View GitHub Profile
@rajesh-vi
rajesh-vi / install-nodejs-ubuntu.txt
Created September 15, 2017 07:27
Install node.js v6.10.2 and npm 3.10.10 for Ubuntu 14.04 for Try Typescript for Codingforenterpreuners
### nvm installation
$ curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh
### run script
$ bash install_nvm.sh
$ source ~/.profile
$ nvm ls
$ nvm install 6.10.2
### set default node
@rajesh-vi
rajesh-vi / index.js
Created April 18, 2019 13:52
oauth2-bearer-jwt-handler lambda function
require('dotenv').config();
const JwtTokenHandler = require('oauth2-bearer-jwt-handler').JwtTokenHandler;
const AuthPolicy = require('./auth-policy');
const fs = require('fs');
const jwtTokenHandler = new JwtTokenHandler({
issuer: process.env.ISSUER,
audience: process.env.AUDIENCE,