|
|
@ -1,4 +1,4 @@ |
|
|
|
## **Authorization** |
|
|
|
## **Autorisierung** |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Zurück zur Übersicht](Startseite) |
|
|
|
[Zurück zur Übersicht](Startseite) |
|
|
@ -6,11 +6,10 @@ |
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
* Authorization Header |
|
|
|
* Authorization Header |
|
|
|
* Auth Middleware |
|
|
|
|
|
|
|
* IP Restrictions |
|
|
|
* IP Restrictions |
|
|
|
|
|
|
|
|
|
|
|
### **Authorization Header** |
|
|
|
### **Authorization Header** |
|
|
|
The Auhorization header will be used to identify the client/API that connect to it. |
|
|
|
Der Auhorization-Header wird verwendet, um den Client/die API zu identifizieren, der/die sich damit verbindet. |
|
|
|
|
|
|
|
|
|
|
|
### **PHP** |
|
|
|
### **PHP** |
|
|
|
Example to set the Header with PHP-Curl: |
|
|
|
Example to set the Header with PHP-Curl: |
|
|
@ -97,4 +96,10 @@ request(options, function (error, response) { |
|
|
|
if (error) throw new Error(error); |
|
|
|
if (error) throw new Error(error); |
|
|
|
console.log(response.body); |
|
|
|
console.log(response.body); |
|
|
|
}); |
|
|
|
}); |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### IP Restrictions |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Jeder Client der die API ansteuert muss von einer IP-Adresse stammen die eingetragen ist. Nicht eingetragene IP-Adressen werden abgelehnt. |
|
|
|
|
|
|
|
Es wird später möglich sein weitere User Accounts zu definieren um Unterkonten zu erstellen welche ebenfalls die API verwenden dürfen. |