Salesforce OAuth 2.0 JWT Bearer Token Flow Walk-Through
This document will walk you through how to create or configure a Salesforce application for use with JWT authentication. These configuration steps and the example code works as of Salesforce API version 42.0.
Prerequisites
Create an RSA x509 private key/certification pair