pdnd-ruby-client 0.1.13 → 0.1.14

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: e045ffae80357cdadf426af827ff4f3af6d47045b55b5037581b5fdf459afdd0
4
- data.tar.gz: 72167ace4b6b941415b747f7538a2880c81f99d867d6c86937e04e17a8382057
3
+ metadata.gz: '0851283b3eb0d48ad3bdd35c1e65384fbe71b84786827ae951abb3f0dfe31cda'
4
+ data.tar.gz: 560f3603d3d5c46719b0c89c15d8f24ec84ea44f967bb8926824203854a17a1a
5
5
  SHA512:
6
- metadata.gz: 28ca911b8877e4be199cb076821350bc8d323f291d715a49d437c459276978c33382476b3ae46375ef766030045e7da2f71da72a3dd033e73d7ddc275f68c53a
7
- data.tar.gz: 33cad7d80af44483bef2a2efc3aa331d1b970a80d204ad67d29eac656acaf34b4249e4489bca77dc5ad9b7ba70ef402467dc88c82f058ce43a20b6a9aae678a3
6
+ metadata.gz: 1b410643479c7232125431390a3a7dae87d8ea36373764dab5790027cfa9d8d52749d2cfe40006509aa4a790174ea52c0c7fb66e7ddbb82774c42d8afdb7298f
7
+ data.tar.gz: 6702cc94f8a0771c8aa3b759667d889c1039e6a6cbf1b88304ab9767be0580ab5275b41e2c50b2f64a3fdae41ee961d89d04dbcab6677a3ce7730a4a576e1bff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.1.14](https://github.com/isprambiente/pdnd-ruby-client/tree/v0.1.14) (2026-03-20)
4
+
5
+ [Full Changelog](https://github.com/isprambiente/pdnd-ruby-client/compare/v0.1.13...v0.1.14)
6
+
3
7
  ## [v0.1.13](https://github.com/isprambiente/pdnd-ruby-client/tree/v0.1.13) (2026-03-20)
4
8
 
5
9
  [Full Changelog](https://github.com/isprambiente/pdnd-ruby-client/compare/v0.1.12...v0.1.13)
data/README.md CHANGED
@@ -26,19 +26,26 @@ MIT
26
26
  2. Configura il file JSON con i parametri richiesti (esempio in `configs/sample.json`):
27
27
  ```json
28
28
  {
29
+ "attestazione": {
30
+ "kid": "kid",
31
+ "issuer": "issuer",
32
+ "clientId": "clientId",
33
+ "purposeId": "purposeId",
34
+ "privKeyPath": "/tmp/key.pem"
35
+ },
29
36
  "collaudo": {
30
37
  "kid": "kid",
31
38
  "issuer": "issuer",
32
39
  "clientId": "clientId",
33
40
  "purposeId": "purposeId",
34
- "privKeyPath": "/tmp/key.priv"
41
+ "privKeyPath": "/tmp/key.pem"
35
42
  },
36
43
  "produzione": {
37
44
  "kid": "kid",
38
45
  "issuer": "issuer",
39
46
  "clientId": "clientId",
40
47
  "purposeId": "purposeId",
41
- "privKeyPath": "/tmp/key.priv"
48
+ "privKeyPath": "/tmp/key.pem"
42
49
  }
43
50
  }
44
51
  ```
@@ -71,7 +78,10 @@ require "pdnd-ruby-client"
71
78
  # Inizializza la configurazione
72
79
  # Load the configuration from the specified JSON file and environment key.
73
80
  config = PDND::ConfigLoader.load("configs/sample.json")
81
+ # Per produzione
74
82
  jwt = PDND::JWTGenerator.new(config)
83
+ # Per collaudo o attestazione
84
+ # jwt = PDND::JWTGenerator.new(config, "collaudo")
75
85
  # Inserisci tutta la chiave privata.
76
86
  # La chiave privata passata manualmente ha la priorità
77
87
  # rispetto a quella inserita nel config file json.
@@ -167,7 +177,7 @@ ruby bin/pdnd_client.rb --api-url "https://api.pdnd.example.it/resource" --confi
167
177
 
168
178
  ### Opzioni disponibili
169
179
 
170
- - `--env` : Specifica l'ambiente da usare (es. collaudo, produzione). Default: `produzione`
180
+ - `--env` : Specifica l'ambiente da usare (es. attestazione, collaudo, produzione). Default: `produzione`
171
181
  - `--config` : Specifica il percorso completo del file di configurazione (es: `--config /configs/sample.json`)
172
182
  - `--debug` : Abilita output dettagliato
173
183
  - `--pretty` : Abilita output dei json formattato in modalità leggibile
@@ -176,7 +186,7 @@ ruby bin/pdnd_client.rb --api-url "https://api.pdnd.example.it/resource" --confi
176
186
  - `--status-url` : URL dell’API di status per verificare la validità del token
177
187
  - `--json`: Stampa le risposte delle API in formato JSON
178
188
  - `--save`: Salva il token per evitare di richiederlo a ogni chiamata
179
- - `--no-verify-ssl`: Disabilita la verifica SSL (utile per ambienti di collaudo)
189
+ - `--no-verify-ssl`: Disabilita la verifica SSL (utile per ambienti di attestazione o collaudo)
180
190
  - `--help`: Mostra questa schermata di aiuto
181
191
 
182
192
  ### Esempi
@@ -215,7 +225,7 @@ Utilizzo:
215
225
  ruby bin/pdnd_client.rb -c /percorso/config.json [opzioni]
216
226
 
217
227
  Opzioni:
218
- --env Specifica l'ambiente da usare (es. collaudo, produzione)
228
+ --env Specifica l'ambiente da usare (es. attestazione, collaudo, produzione)
219
229
  Default: produzione
220
230
  --config Specifica il percorso completo del file di configurazione
221
231
  --debug Abilita output dettagliato
@@ -225,7 +235,7 @@ Opzioni:
225
235
  --status-url URL dell’API di status per verificare la validità del token
226
236
  --json Stampa le risposte delle API in formato JSON
227
237
  --save Salva il token per evitare di richiederlo a ogni chiamata
228
- --no-verify-ssl Disabilita la verifica SSL (utile per ambienti di collaudo)
238
+ --no-verify-ssl Disabilita la verifica SSL (utile per ambienti di attestazione o collaudo)
229
239
  --help Mostra questa schermata di aiuto
230
240
 
231
241
  Esempi:
@@ -263,10 +273,17 @@ Se un parametro non è presente nel file di configurazione, puoi definirlo come
263
273
  }
264
274
  }
265
275
  ```
266
- ## Esempio di configurazione per collaudo e prosuzione
276
+ ## Esempio di configurazione per attestazione, collaudo e produzione
267
277
 
268
278
  ```json
269
279
  {
280
+ "attestazione": {
281
+ "kid": "kid",
282
+ "issuer": "issuer",
283
+ "clientId": "clientId",
284
+ "purposeId": "purposeId",
285
+ "privKeyPath": "/tmp/key.pem"
286
+ },
270
287
  "collaudo": {
271
288
  "kid": "kid",
272
289
  "issuer": "issuer",
data/configs/sample.json CHANGED
@@ -1,4 +1,11 @@
1
1
  {
2
+ "attestazione": {
3
+ "kid": "kid",
4
+ "issuer": "issuer",
5
+ "clientId": "clientId",
6
+ "purposeId": "purposeId",
7
+ "privKeyPath": "/tmp/key.pem"
8
+ },
2
9
  "collaudo": {
3
10
  "kid": "kid",
4
11
  "issuer": "issuer",
@@ -51,7 +51,6 @@ module PDND
51
51
 
52
52
  response = perform_request(@status_url)
53
53
  body = response.body.force_encoding('UTF-8')
54
- puts "📡 Status response: #{body}" if @debug
55
54
  [response.status, JSON.parse(body)]
56
55
  end
57
56
 
@@ -14,7 +14,7 @@ require_relative 'errors'
14
14
  # generator = PDND::JWTGenerator.new(config)
15
15
  # token, exp = generator.generate_token
16
16
  # @attr [Hash] config Configurazione con parametri JWT
17
- # @attr [String] env Ambiente di esecuzione ('produzione' o 'collaudo')
17
+ # @attr [String] env Ambiente di esecuzione ('produzione' o 'collaudo' o 'attestazione')
18
18
  # @attr [Boolean] debug Flag per attivare il logging
19
19
  # @attr [String] token Token di accesso ottenuto
20
20
  # @attr [String] token_exp Data di scadenza del token
@@ -31,7 +31,7 @@ module PDND
31
31
  :token, :token_exp
32
32
 
33
33
  # @param config [Hash] Configurazione con chiavi come :issuer, :clientId, :privKeyPath, ecc.
34
- # @param env [String] Ambiente ('produzione' o 'collaudo')
34
+ # @param env [String] Ambiente ('produzione' o 'collaudo' o 'attestazione')
35
35
  def initialize(config, env = 'produzione')
36
36
  @config = config
37
37
  @env = env
@@ -73,7 +73,10 @@ module PDND
73
73
 
74
74
  # Imposta endpoint e audience in base all'ambiente
75
75
  def configure_environment
76
- if @env == 'collaudo'
76
+ if @env == 'attestazione'
77
+ @endpoint = 'https://auth.att.interop.pagopa.it/token.oauth2'
78
+ @audience = 'auth.att.interop.pagopa.it/client-assertion'
79
+ elsif @env == 'collaudo'
77
80
  @endpoint = 'https://auth.uat.interop.pagopa.it/token.oauth2'
78
81
  @audience = 'auth.uat.interop.pagopa.it/client-assertion'
79
82
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module PDND
4
4
  class ClientVersion
5
- VERSION = '0.1.13'
5
+ VERSION = '0.1.14'
6
6
  end
7
7
  end
data/publiccode.yml CHANGED
@@ -3,7 +3,7 @@ name: PDND Ruby Client
3
3
  applicationSuite: PDNDClient
4
4
  url: https://github.com/isprambiente/pdnd-ruby-client.git
5
5
  landingURL: https://github.com/isprambiente/pdnd-ruby-client
6
- softwareVersion: 0.1.13
6
+ softwareVersion: 0.1.14
7
7
  releaseDate: 2026-03-20
8
8
  platforms:
9
9
  - web
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdnd-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Loreti