kor-client
v1.0.0
Published
Module for retreiving data from kontakt- og reservasjonsregisteret
Downloads
6
Readme
Kontakt- og Reservasjonsregisteret klient
Node.js klient for kontakt- og reservasjonsregisterets Oauth2-API (Server-til-server) - mer info
Denne klienten benytter node-jsonwebtoken for generering av JWT.
Husk å stille klokken på PC-en(!)
Programflyt
- Kjører discover av angitt URL, og henter informasjon fra /.well-known/openid-configuration
- Lager JWT-token med sertifikat, og signerer med privat nøkkel
- Sender http-forespørsel med JWT for å hente token
- Mottar token
Installasjon
git clone https:/github.com/maccyber/kor-client-jsonwebtoken
npm i
node tst.js
Test klient
Endre evt klient-innstillinger i tst.js
Legg inn ditt sertifikat og privatnøkkel i data/
Start med node tst.js
Client options
| Parameter | Verdi | | ------------- |-------------| | url | URL - f.eks. https://oidc-ver1.difi.no/ | | cert | Virksomhetssertifikat i PEM-format | | privateKey | Privat nøkkel til virksomhetssertifikat | | privateKeyPassphrase (valgfri) | Passord for å dekryptere privat nøkkel | | issuer | client ID som er registert hos ID-porten OIDC-provider | | scope | Scope som klient forespør tilgang til, kan sende inn liste av scope separert med whitespace |