assinafy 1.9.0 → 1.11.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c202496157dd16d5ae51e1e6416ca30ab0d6ec3665ffa6dead88219214c82b8
4
- data.tar.gz: 9c07ecf32a3c9e9e94d964d56f6f38dc8c670d2cc011059d4c14409e79972b9e
3
+ metadata.gz: 97dcce395cbee3bd4a632650550becfd07d6fa291da434678d1a31de4488d103
4
+ data.tar.gz: 4cde25cfc6221e23378892c4fa19d7779046b65642bc33dc734756f712c2aab8
5
5
  SHA512:
6
- metadata.gz: 4bd51928265eb56100d62653932be2145442efb23e4708007070a027aeaff0e96678014c4d2a5b39ca2a9dcb37c6a13e5caf3b16798e28b6ad2ad535ef937068
7
- data.tar.gz: 7c1c6a6f07f0794b685b414195161f9832c74e9e196adff5f8713b26b44d7b94c188651184144af0b7393ad8bfea97d601a0e350c7165d2a4709356bcda0743a
6
+ metadata.gz: 437fad120c4ec641767a2241f0e03589e14ea31b3407b603c85e7284476526711cd8d8f8732573d2ab4348aa9387cbfa077e43061ff91e1728eeda766b6c51f2
7
+ data.tar.gz: 9c2e1b81591e038d449145fa3f97f7b2b90f98fbfede435f01cd14fbfbb6b9d62805df762e39a01c0e9de7a8d9e729371d3b88e63b5049fb7ac29b0c10d01b88
data/CHANGELOG.md CHANGED
@@ -2,6 +2,57 @@
2
2
 
3
3
  All notable changes to the `assinafy` Ruby gem are documented here.
4
4
 
5
+ ## 1.11.0
6
+
7
+ ### Added
8
+
9
+ - Webhook endpoints: `WebhookResource#list_endpoints`, `#create_endpoint`, `#get_endpoint`, `#update_endpoint`,
10
+ `#delete_endpoint`, `#endpoint_secret`, and `#rotate_endpoint_secret`. An account can have 1 endpoint, or up to 3
11
+ on paid plans, each with its own URL, events, and signing setting. Secrets cannot be read or rotated by OAuth
12
+ applications.
13
+ - `WebhookResource#list_dispatches` accepts an `endpoint_id` filter.
14
+ - `Assinafy::Support::WebhookVerifier#verify_delivery` verifies Assinafy's Standard Webhooks signatures
15
+ (`webhook-id`, `webhook-timestamp`, `webhook-signature`) with the endpoint's `whsec_` secret and rejects
16
+ timestamps more than 5 minutes off. It accepts Rails `request.headers`, a Rack env, or a plain Hash.
17
+ - Two-factor authentication: `AuthResource#verify_mfa` completes a login that answered with an `mfa_token`, and
18
+ `#mfa_methods`, `#start_totp_enrollment`, `#confirm_totp_enrollment`, `#regenerate_recovery_codes`, and
19
+ `#delete_mfa_method` manage authenticator methods and recovery codes.
20
+ - `SignerResource#create`, `#validate_create!`, and `Client#upload_and_request_signatures` send `government_id`,
21
+ so a `DigitalCertificate` signer can be created in one call.
22
+
23
+ ### Changed
24
+
25
+ - `WebhookResource#register`, `#get`, and `#inactivate` act on the account's oldest webhook endpoint, and
26
+ `#register` rejects keys other than `url`, `email`, `events`, and `is_active`.
27
+ - `WebhookVerifier#verify` remains for receivers whose own gateway signs bodies with a hex HMAC-SHA256.
28
+ - `DocumentResource#upload` no longer takes a `name` option; the document is named after the uploaded file. Use
29
+ `#rename` to change it.
30
+ - `DocumentResource#list` joins an Array `tags` filter into comma-separated tag IDs.
31
+ - `TemplateResource#create` enforces the 25 MB upload limit.
32
+ - `UserResource#stats` and `AccountResource#stats` validate `granularity` (`monthly` or `daily`) and `month`
33
+ (`YYYY-MM`) before sending.
34
+ - `OAuthResource#authorization_server_metadata` accepts only absolute HTTPS URL overrides.
35
+ - `Configuration#base_url=` and `#timeout=` validate their values like the constructor. The `User-Agent` header
36
+ is set on each request.
37
+ - `DigitalCertificate` is documented at 0.5 credits per signer on top of its notification (breakdown code
38
+ `SignatureDigitalCertificate`), with verification and notification methods inferred from each other.
39
+ - The guides cover the complete flow in order, including the two-factor login, OAuth refresh under a
40
+ per-connection lock, and a webhook receiver for Rails and Rack.
41
+
42
+ ## 1.10.1
43
+
44
+ - Update the pinned Ruby setup action to support Ruby 4.0.7 in CI and release workflows.
45
+
46
+ ## 1.10.0
47
+
48
+ - Support the RFC 8693 token-exchange grant for Assinafy-provisioned internal service clients.
49
+ - Validate OAuth grant parameters, PKCE challenges, authorization URLs, and token response shapes.
50
+ - Validate assignment deadlines, notification and verification method combinations, and signing steps before requests.
51
+ - Validate template role and signer IDs, distinct role assignments, and editor field payloads before document creation.
52
+ - Validate contact addresses, scalar payload fields, decline-reason lengths, and finite polling intervals consistently.
53
+ - Expand the document workflow guides, OAuth integration instructions, and API schema reference.
54
+ - Use Ruby 4.0.7 for the development and release toolchain.
55
+
5
56
  ## 1.9.0
6
57
 
7
58
  - `OAuthResource#refresh`, and `#token` with the `refresh_token` grant, raise `Assinafy::Error` instead of
@@ -75,8 +126,7 @@ All notable changes to the `assinafy` Ruby gem are documented here.
75
126
  value as a `422` only after the request has been sent — and after any signers created for that
76
127
  assignment already exist.
77
128
 
78
- - `spec/fixtures/api_contract.json` tracks the current upstream contract (93 operations, 39
79
- schemas), including the four OAuth operations.
129
+ - `spec/fixtures/api_contract.json` tracks the upstream contract, including the four OAuth operations.
80
130
 
81
131
  ### Removed
82
132
 
@@ -162,8 +212,7 @@ All notable changes to the `assinafy` Ruby gem are documented here.
162
212
 
163
213
  - `SignerResource#accept_terms` and `#verify_email` now send `signer-access-code` as
164
214
  the documented query parameter (the `signerAccessCode` security scheme is `in: query`),
165
- consistent with every other signer-authenticated endpoint. Previously it was sent
166
- only in the request body.
215
+ consistent with every other signer-authenticated endpoint.
167
216
  - `TemplateResource#create` now performs the required `multipart/form-data` file
168
217
  upload. The previous JSON body was rejected by the API (HTTP 400) and never worked.
169
218
  Its signature is now `create(source, options = {}, account_id_override = nil)`.
@@ -205,8 +254,8 @@ documentation at <https://api.assinafy.com.br/v1/docs>.
205
254
  method, sourced from the live API and the docs.
206
255
  - Behavioral coverage: `spec/api_coverage_spec.rb` now also fails CI when a public
207
256
  endpoint wrapper is missing a matrix row, and asserts documented aliases still
208
- resolve to their canonical methods. Behavioral WebMock specs were added for the
209
- previously untested methods and for `Client#upload_and_request_signatures`.
257
+ resolve to their canonical methods. Behavioral WebMock specs cover the remaining
258
+ methods and `Client#upload_and_request_signatures`.
210
259
 
211
260
  ### Fixed
212
261