feat: supporto provider SPID Poste Italiane (PosteID) oltre a Sielte#31
Merged
Conversation
Importa il refactor da @pietromalerba (fork upstream): - Estrae il flusso Sielte esistente in _login_sielte() senza cambi funzionali. - Aggiunge _login_poste() per autenticazione tramite PosteID con notifica push sull'app PosteID (timeout 120s, attesa redirect su agenziaentrate.gov.it). - Dispatch via env var SPID_PROVIDER (default 'sielte', retrocompatibile). Valori validi: 'sielte', 'poste'. - Credenziali separate: ADE_USERNAME/ADE_PASSWORD per Sielte (invariato), POSTE_USERNAME/POSTE_PASSWORD per PosteID. NON include il login diretto SISTER (credenziali professionista) presente in altri commit dello stesso fork: è una feature separata con implicazioni di ToS, da valutare in una issue dedicata. Closes #26 (cherry picked from commit aebaa53af04d0a8d8f4cbcd1bd5f4dd1d0aaee70) Co-authored-by: Pietro Malerba <pietro.malerba@gmail.com> Signed-off-by: zornade <hello@zornade.com>
Aggiunge 4 test unitari per il dispatcher di utils.login(): - default 'sielte' quando SPID_PROVIDER non è settato (verifica che il messaggio di errore citi ADE_USERNAME) - SPID_PROVIDER='poste' richiede POSTE_USERNAME/PASSWORD - SPID_PROVIDER='lepida' (non supportato) → ValueError con lista valida - SPID_PROVIDER='POSTE' è normalizzato case-insensitive Estende il test esistente test_login_raises_when_missing_required_env con monkeypatch.delenv su SPID_PROVIDER per isolarlo da test precedenti. Refs #26 Signed-off-by: zornade <hello@zornade.com>
This was referenced May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Risolve #26