@@ -50,7 +50,7 @@ function convertToMs (time) {
5050 return parse ( time )
5151}
5252
53- function JWT ( context , options = { } ) {
53+ function JWT ( options = { } ) {
5454 if ( ! options . secret ) {
5555 throw new Error ( 'Missing secret' )
5656 }
@@ -59,14 +59,10 @@ function JWT (context, options = {}) {
5959 cookie,
6060 decode : decodeOptions = { } ,
6161 formatUser,
62- jwtDecode,
63- jwtSign,
64- jwtVerify,
6562 secret,
6663 sign : initialSignOptions = { } ,
6764 trusted,
68- verify : initialVerifyOptions = { } ,
69- namespace
65+ verify : initialVerifyOptions = { }
7066 } = options
7167
7268 let secretOrPrivateKey
@@ -114,15 +110,9 @@ function JWT (context, options = {}) {
114110 throw new Error ( 'ECDSA Signatures set as Algorithm in the options require a private and public key to be set as the secret' )
115111 }
116112
117- let jwtDecodeName = 'jwtDecode'
118- let jwtVerifyName = 'jwtVerify'
119- let jwtSignName = 'jwtSign'
120-
121- if ( namespace ) {
122- jwtDecodeName = jwtDecode ? ( typeof jwtDecode === 'string' ? jwtDecode : 'jwtDecode' ) : `${ namespace } JwtDecode`
123- jwtVerifyName = jwtVerify || `${ namespace } JwtVerify`
124- jwtSignName = jwtSign || `${ namespace } JwtSign`
125- }
113+ const jwtDecodeName = 'jwtDecode'
114+ const jwtVerifyName = 'jwtVerify'
115+ const jwtSignName = 'jwtSign'
126116
127117 const signerConfig = checkAndMergeSignOptions ( )
128118 const signer = createSigner ( signerConfig . options )
0 commit comments