-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"esversion":6, | ||
"mocha": true, | ||
"asi" : true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
sudo: false | ||
language: node_js | ||
before_install: npm i -g mocha | ||
node_js: | ||
- stable |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exports.default = require('lib') |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
|
||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
|
||
var _jsonwebtoken = require('jsonwebtoken'); | ||
|
||
var _jsonwebtoken2 = _interopRequireDefault(_jsonwebtoken); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
|
||
var Jwt = function () { | ||
// constructor (payload, secret, option) { | ||
function Jwt() { | ||
_classCallCheck(this, Jwt); | ||
} | ||
|
||
_createClass(Jwt, [{ | ||
key: 'signE', | ||
value: function signE(payload, secret, option) {} | ||
}, { | ||
key: 'token', | ||
get: function get() {} | ||
}]); | ||
|
||
return Jwt; | ||
}(); | ||
|
||
// NOTE extends not allow. jwt is object | ||
|
||
|
||
Object.assign(Jwt, _jsonwebtoken2.default); | ||
|
||
exports.default = Jwt; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import jwt from 'jsonwebtoken' | ||
class Jwt { | ||
// constructor (payload, secret, option) { | ||
constructor () { | ||
} | ||
|
||
get token () { | ||
|
||
} | ||
|
||
signE (payload, secret, option) { | ||
|
||
} | ||
} | ||
|
||
// NOTE extends not allow. jwt is object | ||
Object.assign(Jwt, jwt) | ||
|
||
export default Jwt |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
'use strict' | ||
const debug = require('debug') | ||
|
||
const Jwt = require('../lib').default | ||
console.log('Jwt', Jwt) | ||
|
||
describe(`jwt-jwe`, () => { | ||
describe(`test`, () => { | ||
it(`1`, () => { | ||
|
||
const jwt = new Jwt() | ||
debug(jwt) | ||
}) | ||
}) | ||
}) | ||
}) |