Merge pull request #709 from alphagov/update-docs-for-auth-error-resp

Update docs to reflect the changes to the authentication error responses
This commit is contained in:
Chris Hill-Scott
2016-06-20 16:23:07 +01:00
committed by GitHub

View File

@@ -335,11 +335,12 @@ GET /notifications?page=2
Error code | Body | Meaning
--- | --- | ---
401 | {"result": "error", <br> "message": "Unauthorized, authentication token must be provided"} | Authorisation header is missing from request
401 | {"result": "error", <br> "message": "Unauthorized, authentication bearer scheme must be used"} | Authorisation header is missing bearer
403 | {"result": "error", <br> "message": "Invalid token: signature"} | Unable to decode the JSON Web Token signature, due to missing claims
403 | {"result": "error", <br> "message": "Invalid credentials"} | Service ID in the `iss` claim is incorrect, or no valid API key for Service ID
403 | {"result": "error", <br> "message": "Invalid token: expired"} | Token is expired; there is a 30 second time limit
401 | {"result": "error", <br> "message": {"token": ["Invalid token: Unauthorized, authentication token must be provided"]}} | Authorisation header is missing from request
401 | {"result": "error", <br> "message": {"token": ["Invalid token: Unauthorized, authentication bearer scheme must be used"]}} | Authorisation header is missing bearer
403 | {"result": "error", <br> "message": {"token": ["Invalid token: Invalid token: signature"]}} | Unable to decode the JSON Web Token signature, due to missing claims
403 | {"result": "error", <br> "message": {"token": ["Invalid token: Invalid credentials"]}} | Service ID in the `iss` claim is incorrect, or no valid API key for Service ID
403 | {"result": "error", <br> "message": {"token": ["Invalid token: no api keys for service"]}} | No valid API key for Service ID
403 | {"result": "error", <br> "message": {"token": ["Invalid token: expired"]}} | Token is expired; there is a 30 second time limit