Skip to content
Snippets Groups Projects
Verified Commit f604637b authored by Jonas Gröger's avatar Jonas Gröger :palm_tree:
Browse files

fix(docs): Authorization not Authentication as auth header

'tis but a typo
parent 99d8c8a4
No related branches found
No related tags found
1 merge request!29fix(docs): Authorization not Authentication as auth header
......@@ -15,7 +15,7 @@ Fast alle Anfragen an die FIT-Connect Submission API müssen authentifiziert wer
Hierfür ist ein Access Token notwendig, das beim OAuth-Dienst über die hierfür vorgesehene `Token URL` abgerufen werden kann (siehe Abschnitt `AUTHENTICATION` in der [Schnittstellenspezifikation](../apis/delivery-service)).
Für den Abruf von Access Tokens ist die [Konfiguration eines API-Client im Self-Service-Portal](../account.mdx) nötig.
Das Token kann anschließend bei Anfragen über den `Authentication` Header mitgeschickt werden.
Das Token kann anschließend bei Anfragen über den `Authorization` Header mitgeschickt werden.
Da ein Token **max. 30 Minuten** gültig ist, muss dieses rechtzeitig erneuert werden.
Wenn keine spezifischer Scope angefragt wird (siehe nächster Abschnitt), enthält der Access Token alle Scopes, die zu diesem Zeitpunkt beim Client im Self-Service-Portal hinterlegt wurden.
......
......@@ -97,7 +97,7 @@ Für die Bearbeitung über die API sind folgende Voraussetzung zu erfüllen:
$ export SERVICE_URL=...
$ export JWT_TOKEN=eyJhbGciOiJIUzI1NiJ9.eyJJc3N1Z...NL-MKFrDGvn9TvkA
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
--data "@./myDestination.json" \
-X POST $SERVICE_URL/destinations
......
......@@ -15,7 +15,7 @@ $ export SERVICE_URL=<URL>
$ export JWT_TOKEN=eyJhbGciOiJIUzI1NiJ9.eyJJc3N1Z...NL-MKFrDGvn9TvkA
$ export SUBMISSION_ID=9d618546-0ff7-4e93-9f15-714e5dd1bf12
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
-X GET $SERVICE_URL/submissions/$SUBMISSION_ID
> {
......@@ -45,7 +45,7 @@ $ export JWT_TOKEN=eyJhbGciOiJIUzI1NiJ9.eyJJc3N1Z...NL-MKFrDGvn9TvkA
$ export SUBMISSION_ID=9d618546-0ff7-4e93-9f15-714e5dd1bf12
$ export ATTACHMENT_ID=122668ad-3081-497c-9358-7ce4b6144b02
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/jose" \
-X GET $SERVICE_URL/submissions/$SUBMISSION_ID/attachments/$ATTACHMENT_ID
> 6r4H2H_WIzCv8Pd-uetmcbK...iVBKF3ylHRUahmZ
......
......@@ -40,7 +40,7 @@ In diesem Fall werden nur die Submissions zurückgegeben, die zum angegebenen Zu
$ export SERVICE_URL=<URL>
$ export JWT_TOKEN=eyJhbGciOiJIUzI1NiJ9.eyJJc3N1Z...NL-MKFrDGvn9TvkA
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
-X GET $SERVICE_URL/submissions
> {
......
......@@ -29,7 +29,7 @@ In dem folgenden Ausschnitt wird dargestellt, wie eine bereits verschlüsselte D
$ export ATTACHMENT_ID=90ae8309-2102-4e81-a325-ceda480d0e9d
$ export ENC_FILE_CONTENT=6r4H2H_WIzCv8Pd-uetmcbK...iVBKF3ylHRUahmZ
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/jose" \
--data "$ENC_FILE_CONTENT" \
-X PUT $SERVICE_URL/submissions/$SUBMISSION_ID/attachments/$ATTACHMENT_ID
......@@ -55,7 +55,7 @@ In dem folgenden Ausschnitt wird dargestellt, wie eine bereits verschlüsselte D
timeout: 2000,
headers: {
'Content-Type': 'application/jose',
'Authentication': `Bearer ${token}`,
'Authorization': `Bearer ${token}`,
}
}
)
......
......@@ -41,7 +41,7 @@ $ export SERVICE_URL=...
$ export JWT_TOKEN=eyJhbGciOiJIUzI1NiJ9.eyJJc3N1Z...NL-MKFrDGvn9TvkA
$ export DESTINATION_ID=7a2668ad-3081-407c-9358-7ce4b6144b02
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
-X GET $SERVICE_URL/destinations/$DESTINATION_ID
......
......@@ -31,7 +31,7 @@ $ export SERVICE_URL=...
$ export JWT_TOKEN=eyJhbGciOiJIUzI1NiJ9.eyJJc3N1Z...NL-MKFrDGvn9TvkA
$ export DESTINATION_ID=7a2668ad-3081-407c-9358-7ce4b6144b02
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
--data "{ \"destinationId\": \"$DESTINATION_ID\", \"announcedContentStructure\": { \"data\": true, \"attachments\": [\"1da99641-2067-4e8b-b049-91b2a6c90544\", \"538a1365-092e-4d80-93b9-90eb8c1f5982\"] }, \"serviceType\": { \"name\": \"Bauantrag\", \"identifier\": \"urn:de:fim:leika:leistung:99010003001006\" } }" \
-X POST $SERVICE_URL/submissions
......@@ -79,7 +79,7 @@ axios.post(
baseURL,
timeout: 2000,
headers: {
'Authentication': `Bearer ${token}`
'Authorization': `Bearer ${token}`
}
}
)
......
......@@ -32,7 +32,7 @@ $ export SERVICE_URL=...
$ export JWT_TOKEN=eyJhbGciOiJIUzI1NiJ9.eyJJc3N1Z...NL-MKFrDGvn9TvkA
$ export SUBMISSION_ID=63f0c991-0635-4e18-8a4b-fb0c01de9f5c
$ curl \
-H "Authentication: Bearer $JWT_TOKEN" \
-H "Authorization: Bearer $JWT_TOKEN" \
-H "Content-Type: application/json" \
--data '{ "encryptedMetadata": "6r4H2H_WIzCv8Pd-uetmcbK...iVBKF3ylHRUahmZ" }' \
-X PUT $SERVICE_URL/submissions/$SUBMISSION_ID
......@@ -59,7 +59,7 @@ axios.put(
timeout: 2000,
headers: {
'Content-Type': 'application/json',
'Authentication': `Bearer ${token}`,
'Authorization': `Bearer ${token}`,
}
}
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment