You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Mary Anthony 764404a2d5 Updating for tokens 7 years ago
..
browser.js Updating for tokens 7 years ago
client.js Updating for tokens 7 years ago
crypto.js Updating for tokens 7 years ago
index.js Updating for tokens 7 years ago
readme.js Updating for tokens 7 years ago
server.js Updating for tokens 7 years ago
uri.js Updating for tokens 7 years ago
utils.js Updating for tokens 7 years ago

readme.js

// Load modules


var Code = require('code');
var Hawk = require('../lib');
var Hoek = require('hoek');
var Lab = require('lab');


// Declare internals

var internals = {};


// Test shortcuts

var lab = exports.lab = Lab.script();
var describe = lab.experiment;
var it = lab.test;
var expect = Code.expect;


describe('README', function () {

describe('core', function () {

var credentials = {
id: 'dh37fgj492je',
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
algorithm: 'sha256'
};

var options = {
credentials: credentials,
timestamp: 1353832234,
nonce: 'j4h3g2',
ext: 'some-app-ext-data'
};

it('should generate a header protocol example', function (done) {

var header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', options).field;

expect(header).to.equal('Hawk id="dh37fgj492je", ts="13538