This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var webdriver = require('selenium-webdriver'); | |
| var chrome = require('selenium-webdriver/chrome'); | |
| var path = require('chromedriver').path; | |
| var service = new chrome.ServiceBuilder(path).build(); | |
| chrome.setDefaultService(service); | |
| var chai = require('chai'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <form class="name-collecting-form"> | |
| <input type="text" name="givenName" placeholder="given name"> | |
| <button>submit</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| `git clone git@github.com:smooch/smooch-js.git` | |
| `git checkout f/embedded` | |
| `npm install` | |
| `grunt build` | |
| Then take smooch.js from the dist file | |
| --> | |
| <!DOCTYPE html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require('superagent'); | |
| var jwt = require('jsonwebtoken'); | |
| var USER_ID = 'appUser _id'; | |
| var KEY_ID = 'your_key_id'; | |
| var SECRET = 'your_secret'; | |
| var token = jwt.sign({ | |
| scope: 'app' | |
| }, | |
| SECRET, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require('superagent'); | |
| var jwt = require('jsonwebtoken'); | |
| var USER_ID = 'appUser _id'; | |
| var KEY_ID = 'your_key_id'; | |
| var SECRET = 'your_secret'; | |
| var token = jwt.sign({ | |
| scope: 'app' | |
| }, | |
| SECRET, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('http').createServer(function(request, response) { | |
| request.pipe(process.stdout) | |
| response.end(); | |
| }).listen(8000, function() { | |
| console.log('Server listening on: http://localhost:%s', '8000'); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var express = require('express'); | |
| var app = express(); | |
| app.use('/public', express.static(__dirname + '/build')); | |
| app.get('/', function(req, res) { | |
| res.sendFile(__dirname + '/index.html'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Smooch = require('smooch-core'); | |
| var request = require('request'); | |
| var jwt = require('jsonwebtoken'); | |
| var fs = require('fs'); | |
| var USER_ID = 'a_user_id'; | |
| var KEY_ID = 'your_key_id'; | |
| var SECRET = 'your_secret'; | |
| var token = jwt.sign({ | |
| scope: 'app' | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var jwt = require('jsonwebtoken'); | |
| var express = require('express'); | |
| var app = express(); | |
| var port = process.env.PORT || 3000; | |
| app.get('/', function(req, res) { | |
| var token = jwt.sign({ | |
| scope: 'app' | |
| }, | |
| req.query.secret, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'unirest' | |
| require 'jwt' | |
| SECRET = 'your_secret' | |
| KEY_ID = 'your_key' | |
| USER_ID = 'user_id' | |
| payload = { | |
| :scope => 'app' | |
| } |