Update authentication.md

This commit is contained in:
Z
2017-06-26 09:01:13 +02:00
committed by GitHub
parent cae5658626
commit fabd509c31

View File

@@ -1,5 +1,4 @@
# Authentication # Authentication
Every API exposed outside of the adidas network **MUST** be available to authenticated clients only. Every unauthenticated HTTP request to exposed API **MUST** result in the **403 Forbidden** HTTP Status code. Every API exposed outside of the adidas network **MUST** be available to authenticated clients only. Every unauthenticated HTTP request to exposed API **MUST** result in the **403 Forbidden** HTTP Status code.
Based on whether user authorization is required an API call can be authenticated in two ways: Based on whether user authorization is required an API call can be authenticated in two ways:
@@ -11,7 +10,7 @@ Based on whether user authorization is required an API call can be authenticated
Every API that requires user authentication or authorization **MUST** use OAuth 2 tokens to authenticate the client. Every API that requires user authentication or authorization **MUST** use OAuth 2 tokens to authenticate the client.
## API Key ## API Key
If an API doesn't need to authorize user the API **MAY** use simple the API token instead of the OAuth 2 token. The key **MUST** be provided in the `Adidas-API-Key` HTTP header. An API **MAY** use simple the API token instead of the OAuth 2 token if it doesn't need to authorize the user . The key **MUST** be provided in the `Adidas-API-Key` HTTP header.
#### Example #### Example
@@ -23,5 +22,4 @@ Adidas-API-Key: 9kfapap6612jkfd3ja9323q
Host: adidas.api.mashery.com Host: adidas.api.mashery.com
``` ```
> NOTE: See more details in the [[Demo] Approval API](http://docs.demoapprovalapi.apiary.io) example. > NOTE: See more details in the [[Demo] Approval API](http://docs.demoapprovalapi.apiary.io) example.