@assinafy/sdk 2.1.2 → 2.3.0
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 +168 -1
- package/README.en.md +1373 -0
- package/README.md +763 -522
- package/SECURITY.md +17 -2
- package/dist/index.d.mts +794 -12
- package/dist/index.d.ts +794 -12
- package/dist/index.js +900 -59
- package/dist/index.mjs +894 -57
- package/docs/API_COVERAGE.md +28 -4
- package/docs/COMPATIBILITY.md +86 -0
- package/package.json +2 -1
package/SECURITY.md
CHANGED
|
@@ -44,8 +44,23 @@ opportunity to upgrade.
|
|
|
44
44
|
authentication, and signer-access-code flows use an auth-free transport so
|
|
45
45
|
configured account credentials are not sent to public endpoints.
|
|
46
46
|
- Consumers must use HTTPS endpoints and protect all SDK configuration as
|
|
47
|
-
secrets.
|
|
48
|
-
|
|
47
|
+
secrets. The client enforces this: a `baseUrl` using plaintext `http` is
|
|
48
|
+
rejected unless its host is loopback, so a credential cannot be sent in the
|
|
49
|
+
clear to a remote host. Debug logging and error telemetry must be reviewed
|
|
50
|
+
for response data before being enabled in production.
|
|
51
|
+
- An OAuth `client_secret` belongs only on a server you control: never in
|
|
52
|
+
browser code, a mobile application, or a repository. A public application has
|
|
53
|
+
no secret and authenticates with PKCE alone. The SDK sends the token and
|
|
54
|
+
revocation requests on the credential-free transport, so a workspace
|
|
55
|
+
`X-Api-Key` is never attached to a route that authenticates the application.
|
|
56
|
+
- Treat OAuth refresh tokens as single-use. Each refresh returns a new one and
|
|
57
|
+
retires the old one, and replaying a retired token ends the whole connection
|
|
58
|
+
for that user. Persist the new value before acting on the response, and never
|
|
59
|
+
refresh one connection concurrently.
|
|
60
|
+
- Authorization responses are validated before they are trusted: `state` is
|
|
61
|
+
compared in constant time and `iss` must match the expected issuer. Do not
|
|
62
|
+
bypass `readAuthorizationCallback()` and exchange a code straight from the
|
|
63
|
+
query string.
|
|
49
64
|
- The webhook HMAC helper is an opt-in utility, not proof of an official
|
|
50
65
|
Assinafy signing contract. Confirm the header, algorithm, encoding, and secret
|
|
51
66
|
delivery mechanism with Assinafy before enforcing it. See
|