OpenBankProject / OBP-CLI

A command line interface for OBP API
GNU Affero General Public License v3.0
15 stars 15 forks source link

implement getconsent status cli #89

Closed chrisjsimpson closed 5 years ago

chrisjsimpson commented 5 years ago
curl -X GET \
  http://127.0.0.1:8080/berlin-group/v1.3/consents/CONSENTID/status \
  -H 'Authorization: DirectLogin token=eyJhbGciOiJIUzI1NiJ9.eyIiOiIifQ.xflStTeAfTvHJNkKhZsajHJ2yhbLVOgG5dJmuhjTcLQ' \
  -H 'Cache-Control: no-cache' \
  -H 'PSD2-CERT: -----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----' \
chrisjsimpson commented 5 years ago

Why are we not using --cacert for this?

chrisjsimpson commented 5 years ago

@constantine2nd any thoughts welcome :+1:

It (https://github.com/OpenBankProject/OBP-CLI/pull/90/files#diff-6a4a6f574a6df707a4f483ef9f0f1ff1R22) simply performs the same curl request, but using the obp cli

e.g. Running obp getconsentstatus --cert /tmp/test.pem

Will produce the http request:

GET /berlin-group/v1.3/consents/{consent_id}/status HTTP/1.1
Host: example.com
Accept: application/json
Authorization: DirectLogin token="abc123"
PSD2-CERT: -----BEGIN CERTIFICATE-----redacted-----END CERTIFICATE-----