Skip to content

Instantly share code, notes, and snippets.

View SFoskitt's full-sized avatar

Stephanie Foskitt SFoskitt

View GitHub Profile

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

@SFoskitt
SFoskitt / ExampleService.js
Last active March 13, 2017 19:00
ExampleService method for POCR endpoint
/**
* Update Purchase Order Change Request options - separate end point
*
*/
function updatePocrOptions (options) {
if(options){
return $http.put('api/company/settings/updatePocrOptions/', options)
.then((response) => {
// check for any errors in server response
const containsErrors = response.data.success === false;
@SFoskitt
SFoskitt / DocumentDisplaySpec.js
Last active March 13, 2017 19:04
DocumentDisplaySpec.js
/**
* Created by SFoskitt on 7/29/16.
*/
describe('DocumentDisplayStateService: ', () => {
let $rootScope, $scope, $httpBackend, DocumentDisplayStateService;
beforeEach(() => {
angular.mock.module('');
@SFoskitt
SFoskitt / budgeting.js
Last active March 13, 2017 19:09
Node Budgeting
var router = require('express').Router(),
request = require('request'),
common = require(global.app_controllers + '/common');
/**
* Get budgeting info per PO or PR
* /purchaseapi/api/unitId/{unitId}/purchase-requests/{requestId}/budget-data/list
* purchaseapi/api/purchase-requests/576b8acee4b09e5955ba6cb2
*/