This repository was archived by the owner on Feb 24, 2021. It is now read-only.
Commit cca49a7 1 parent a5694b5 commit cca49a7 Copy full SHA for cca49a7
File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,8 @@ const oothJwt = require("ooth-jwt").default;
297
297
298
298
oothJwt ({
299
299
ooth, // Required
300
- sharedSecret: SHARED_SECRET // Can be any long random string, needs to be shared with the API
300
+ sharedSecret: SHARED_SECRET // Can be any long random string, needs to be shared with the API,
301
+ tokenLocation: ' header' // Place to read token from. Can be 'body', 'header' or 'both'. Defaults to 'both'
301
302
});
302
303
```
303
304
@@ -308,7 +309,8 @@ oothJwt({
308
309
ooth, // Required
309
310
privateKey: fs .readFileSync (" path/to/private.key" ),
310
311
publicKey: fs .readFileSync (" path/to/public.key" ),
311
- algorithm: ALGORITHM_TU_USE // Defaults to 'RS256'. Used only if a publicKey / privateKey pair is provided
312
+ algorithm: ALGORITHM_TO_USE , // Defaults to 'RS256'. Used only if a publicKey / privateKey pair is provided
313
+ tokenLocation: ' header'
312
314
});
313
315
```
314
316
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ async function start() {
49
49
} )
50
50
}
51
51
oothUser ( { ooth } ) ;
52
- oothJwt ( { ooth, sharedSecret : process . env . SHARED_SECRET } ) ;
52
+ oothJwt ( { ooth, sharedSecret : process . env . SHARED_SECRET , tokenLocation : 'header' } ) ;
53
53
oothWs ( { ooth } ) ;
54
54
55
55
app . listen ( process . env . PORT , function ( ) {
You can’t perform that action at this time.
0 commit comments