Add node modules and compiled JavaScript from main (#54)
Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
committed by
GitHub
parent
4a983766a0
commit
52d71d28bd
34
node_modules/jose/lib/jwk/key/none.js
generated
vendored
Normal file
34
node_modules/jose/lib/jwk/key/none.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
const { inspect } = require('util')
|
||||
|
||||
const Key = require('./base')
|
||||
|
||||
class NoneKey extends Key {
|
||||
constructor () {
|
||||
super({ type: 'unsecured' }, { alg: 'none' })
|
||||
Object.defineProperties(this, {
|
||||
kid: { value: undefined },
|
||||
kty: { value: undefined },
|
||||
thumbprint: { value: undefined },
|
||||
toJWK: { value: undefined },
|
||||
toPEM: { value: undefined }
|
||||
})
|
||||
}
|
||||
|
||||
/* c8 ignore next 3 */
|
||||
[inspect.custom] () {
|
||||
return 'None {}'
|
||||
}
|
||||
|
||||
algorithms (operation) {
|
||||
switch (operation) {
|
||||
case 'sign':
|
||||
case 'verify':
|
||||
case undefined:
|
||||
return new Set(['none'])
|
||||
default:
|
||||
return new Set()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new NoneKey()
|
Reference in New Issue
Block a user