Closed ymhmd closed 1 year ago
have you registered the metadata? this is how you would do it in the test env: https://demo.spid.gov.it/validator#/metadata-sp-download
@Gioppix, thanks a lot for the answer. It worked on test/demo env after I registered the metadata.
One more question, how can we register the metadata with real IdPs (Poste, Sielte ...etc) ? Maybe some docs can help 🙏
@ymhmd this is the list of IdPs - https://registry.spid.gov.it/identity-providers . I think you need to find the registration page for each one. May I ask how you updated the privateKey and spCert? I can't get this to work on the test env.
Thanks!
@Gioppix, To make it work, I did the following steps:
crt.pem
, csr.pem
and key.pem
const privateKey = (await fs.readFile("/path/key.pem")).toString();
const privateKey = (await fs.readFile("/path/crt.pem")).toString();
I hope this will make it work for you. If not, please let me know
@ymhmd what command have you used to start? have you cloned the repo or just the example? thanks
@Gioppix
First, you need to install this python requirement using pip install spid-compliant-certificates
We can generate crt.pem
, csr.pem
and key.pem
with:
spid-compliant-certificates generator \
--key-size 3072 \
--common-name example \
--days 365 \
--entity-id YOUR_ENTITY_ID \
--locality-name Roma \
--org-id PA:IT-c_h501 \
--org-name example \
--sector public
To validate them, please run spid-compliant-certificates validator --sector public
(this command should be executed in the same directory where crt.pem
, csr.pem
and key.pem
exist
@ymhmd Sorry I was unclear, I meant the command to start the whole project on localhost
@Gioppix To run it locally:
dev
script in package.json
to ts-node-dev --respawn --inspect=0.0.0.0:9229 -- examples/main.ts
yarn dev
@ymhmd thanks a lot!
Hi,
I've just noticed one error happened to me while using
example.ts
. I am not sure the root cause of this issue. Could you please help me to understand the issue?Steps
const idp = 'https://posteid.poste.it'
privateKey
andspCert
IPACode
to bePA:IT-c_h501
yarn dev
http://localhost:4000/login
in the browserhttps://posteid.poste.it/jod-fs/ssoservicepost
Error Error message
messaggio di avvisoErrore: Formato richiesta non corretto - Contattare il gestore del servizio
appearsScreenshot