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 => {
8
8
grunt . loadNpmTasks ( 'grunt-mocha-test' ) ;
9
9
grunt . loadNpmTasks ( 'grunt-contrib-connect' ) ;
10
10
grunt . loadNpmTasks ( 'grunt-exec' ) ;
11
+ grunt . loadNpmTasks ( 'grunt-crx' ) ;
11
12
12
13
grunt . initConfig ( {
13
14
clean : {
@@ -69,6 +70,13 @@ module.exports = grunt => {
69
70
}
70
71
} ,
71
72
73
+ crx : {
74
+ pack : {
75
+ src : "dist/extension/**/*" ,
76
+ dest : "dist/jwt-debugger-extension.zip"
77
+ }
78
+ } ,
79
+
72
80
stylus : {
73
81
website : {
74
82
files : {
@@ -208,7 +216,8 @@ module.exports = grunt => {
208
216
'clean:extension' ,
209
217
'copy:extension' ,
210
218
'build-extension-views' ,
211
- 'webpack:extensionProd'
219
+ 'webpack:extensionProd' ,
220
+ 'crx:pack'
212
221
] ) ;
213
222
214
223
grunt . registerTask ( 'build-extension-dev' , [
Original file line number Diff line number Diff line change 26
26
"grunt-contrib-pug" : " ^1.0.0" ,
27
27
"grunt-contrib-stylus" : " ^1.2.0" ,
28
28
"grunt-contrib-watch" : " ^1.0.0" ,
29
+ "grunt-crx" : " ^1.0.5" ,
29
30
"grunt-exec" : " ^3.0.0" ,
30
31
"grunt-mocha-test" : " ^0.13.3" ,
31
32
"grunt-webpack" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ q9UU8I5mEovUf86QZ7kOBIjJwqnzD1omageEHWwHdBO6B+dFabmdT9POxg==
41
41
42
42
export default {
43
43
hs256 : {
44
- token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.39jkN-bckg4fbZQEb0xHIxzYL9qI_g4c4WyzEYNHZok ' ,
44
+ token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o ' ,
45
45
secret : 'secret'
46
46
} ,
47
47
hs384 : {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ q9UU8I5mEovUf86QZ7kOBIjJwqnzD1omageEHWwHdBO6B+dFabmdT9POxg==
41
41
42
42
module . exports = {
43
43
hs256 : {
44
- token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.39jkN-bckg4fbZQEb0xHIxzYL9qI_g4c4WyzEYNHZok ' ,
44
+ token : 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.XbPfbIHMI6arZ3Y922BhjWgQzWXcXNrz0ogtVhfEd2o ' ,
45
45
secret : 'secret'
46
46
} ,
47
47
hs384 : {
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ describe('Editor', function() {
60
60
61
61
it ( 'Should display a tooltip with a human readable ' +
62
62
'date on claim hover' , async function ( ) {
63
+ await this . page . select ( '#algorithm-select' , 'HS384' ) ;
64
+
63
65
await this . page . mouse . move ( 0 , 0 ) ;
64
66
65
67
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() {
29
29
} ) ;
30
30
31
31
it ( 'considers Base64 (not URL) encoded tokens invalid' , function ( ) {
32
- const token = b64utob64 ( tokens . hs256 . token ) ;
32
+ const token = b64utob64 ( tokens . hs384 . token ) ;
33
33
34
34
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 ;
36
36
} ) ;
37
37
38
38
it ( 'verifies valid tokens' , function ( ) {
You can’t perform that action at this time.
0 commit comments