File tree Expand file tree Collapse file tree 6 files changed +17
-5
lines changed Expand file tree Collapse file tree 6 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ module.exports = grunt => {
88 grunt . loadNpmTasks ( 'grunt-mocha-test' ) ;
99 grunt . loadNpmTasks ( 'grunt-contrib-connect' ) ;
1010 grunt . loadNpmTasks ( 'grunt-exec' ) ;
11+ grunt . loadNpmTasks ( 'grunt-crx' ) ;
1112
1213 grunt . initConfig ( {
1314 clean : {
@@ -69,6 +70,13 @@ module.exports = grunt => {
6970 }
7071 } ,
7172
73+ crx : {
74+ pack : {
75+ src : "dist/extension/**/*" ,
76+ dest : "dist/jwt-debugger-extension.zip"
77+ }
78+ } ,
79+
7280 stylus : {
7381 website : {
7482 files : {
@@ -208,7 +216,8 @@ module.exports = grunt => {
208216 'clean:extension' ,
209217 'copy:extension' ,
210218 'build-extension-views' ,
211- 'webpack:extensionProd'
219+ 'webpack:extensionProd' ,
220+ 'crx:pack'
212221 ] ) ;
213222
214223 grunt . registerTask ( 'build-extension-dev' , [
Original file line number Diff line number Diff line change 2626 "grunt-contrib-pug" : " ^1.0.0" ,
2727 "grunt-contrib-stylus" : " ^1.2.0" ,
2828 "grunt-contrib-watch" : " ^1.0.0" ,
29+ "grunt-crx" : " ^1.0.5" ,
2930 "grunt-exec" : " ^3.0.0" ,
3031 "grunt-mocha-test" : " ^0.13.3" ,
3132 "grunt-webpack" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ q9UU8I5mEovUf86QZ7kOBIjJwqnzD1omageEHWwHdBO6B+dFabmdT9POxg==
4141
4242export default {
4343 hs256 : {
44- token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.39jkN-bckg4fbZQEb0xHIxzYL9qI_g4c4WyzEYNHZok ' ,
44+ token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o ' ,
4545 secret : 'secret'
4646 } ,
4747 hs384 : {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ q9UU8I5mEovUf86QZ7kOBIjJwqnzD1omageEHWwHdBO6B+dFabmdT9POxg==
4141
4242module . exports = {
4343 hs256 : {
44- token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.39jkN-bckg4fbZQEb0xHIxzYL9qI_g4c4WyzEYNHZok ' ,
44+ token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o ' ,
4545 secret : 'secret'
4646 } ,
4747 hs384 : {
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ describe('Editor', function() {
6060
6161 it ( 'Should display a tooltip with a human readable ' +
6262 'date on claim hover' , async function ( ) {
63+ await this . page . select ( '#algorithm-select' , 'HS384' ) ;
64+
6365 await this . page . mouse . move ( 0 , 0 ) ;
6466
6567 expect ( await this . page . $eval ( '#js-payload-tooltip' , isVisible ) ) . to . be . false ;
Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ describe('JWT', function() {
2929 } ) ;
3030
3131 it ( 'considers Base64 (not URL) encoded tokens invalid' , function ( ) {
32- const token = b64utob64 ( tokens . hs256 . token ) ;
32+ const token = b64utob64 ( tokens . hs384 . token ) ;
3333
3434 jwt . isToken ( token ) . should . be . false ;
35- jwt . verify ( token , tokens . hs256 . secret ) . should . be . false ;
35+ jwt . verify ( token , tokens . hs384 . secret ) . should . be . false ;
3636 } ) ;
3737
3838 it ( 'verifies valid tokens' , function ( ) {
You can’t perform that action at this time.
0 commit comments