vestauth 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
[Unreleased](https://github.com/vestauth/vestauth/compare/v0.8.
|
|
5
|
+
[Unreleased](https://github.com/vestauth/vestauth/compare/v0.8.4...main)
|
|
6
|
+
|
|
7
|
+
## [0.8.4](https://github.com/vestauth/vestauth/compare/v0.8.3...v0.8.4) (2026-02-06)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Patch bug with missing `web-bot-auth` lib
|
|
6
12
|
|
|
7
13
|
## [0.8.3](https://github.com/vestauth/vestauth/compare/v0.8.2...v0.8.3) (2026-02-06)
|
|
8
14
|
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -28,7 +28,6 @@ async function verify (httpMethod, uri) {
|
|
|
28
28
|
const publicJwk = options.publicJwk ? JSON.parse(options.publicJwk) : undefined
|
|
29
29
|
|
|
30
30
|
const output = await primitives.verify(httpMethod, uri, headers, publicJwk)
|
|
31
|
-
// const output = await primitive.verifyWebBotAuth(httpMethod, uri, signature, signatureInput, JSON.parse(publicJwk))
|
|
32
31
|
|
|
33
32
|
let space = 0
|
|
34
33
|
if (options.prettyPrint) {
|
package/src/lib/primitives.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
const keypair = require('./helpers/keypair')
|
|
2
2
|
const headers = require('./helpers/headers')
|
|
3
3
|
const verify = require('./helpers/verify')
|
|
4
|
-
const verifyWebBotAuth = require('./helpers/verifyWebBotAuth')
|
|
5
4
|
|
|
6
5
|
module.exports = {
|
|
7
6
|
keypair,
|
|
8
7
|
headers,
|
|
9
|
-
verify
|
|
10
|
-
verifyWebBotAuth
|
|
8
|
+
verify
|
|
11
9
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const { verify } = require('web-bot-auth')
|
|
2
|
-
const { verifierFromJWK } = require('web-bot-auth/crypto')
|
|
3
|
-
|
|
4
|
-
async function verifyWebBotAuth (httpMethod, uri, signatureHeader, signatureInputHeader, publicJwk) {
|
|
5
|
-
let success = false
|
|
6
|
-
|
|
7
|
-
const verifier = await verifierFromJWK(publicJwk)
|
|
8
|
-
const signedRequest = new Request(uri, {
|
|
9
|
-
headers: {
|
|
10
|
-
Signature: signatureHeader,
|
|
11
|
-
'Signature-Input': signatureInputHeader
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
await verify(signedRequest, verifier)
|
|
17
|
-
success = true
|
|
18
|
-
} catch (_e) {}
|
|
19
|
-
|
|
20
|
-
return {
|
|
21
|
-
success
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
module.exports = verifyWebBotAuth
|