Skip to content

Commit d836819

Browse files
naltatisclaude
andauthored
Document http plugin auth (#915)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 02db075 commit d836819

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

docs/devices/plugins.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,51 @@ Der volle Funktionsumfang ist in der [offiziellen jq Dokumentation](https://jqla
404404
Methoden der Authentifizierung sind `basic`, `bearer` und `digest`.
405405
Die Namen der jeweiligen Parameter finden sich [hier](https://github.com/evcc-io/evcc/blob/master/plugin/http_auth.go#L23).
406406

407+
#### Authentifizierung {#http-auth}
408+
409+
Für HTTP-Anfragen stehen verschiedene Authentifizierungsmethoden zur Verfügung:
410+
411+
**Basic Authentication**:
412+
413+
```yaml
414+
auth:
415+
type: basic
416+
user: <benutzername>
417+
password: <passwort>
418+
```
419+
420+
**Bearer Token** (z. B. für JWT):
421+
422+
```yaml
423+
auth:
424+
type: bearer
425+
token: <token>
426+
```
427+
428+
**Digest Authentication**:
429+
430+
```yaml
431+
auth:
432+
type: digest
433+
user: <benutzername>
434+
password: <passwort>
435+
```
436+
437+
**Benutzerdefinierte Authentifizierung**:
438+
439+
Für komplexere Authentifizierungsszenarien können benutzerdefinierte Authentifizierungs-Plugins entwickelt werden.
440+
Diese werden über den Parameter `source` eingebunden:
441+
442+
```yaml
443+
auth:
444+
source: <plugin-name>
445+
user: <benutzername>
446+
password: <passwort>
447+
# weitere plugin-spezifische Parameter
448+
```
449+
450+
Dies ermöglicht die Integration von Geräten mit speziellen Authentifizierungsanforderungen, ohne den gesamten HTTP-Plugin-Code anpassen zu müssen.
451+
407452
:::important Wichtig
408453
XML-Dokumente werden intern automatisch in JSON-Form überführt, welche dann mit jq wie eine native JSON-Antwort weiter gefiltert werden können.
409454
Attribute bekommen das prefix `attr`.

i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,51 @@ The full functionality can be found in the [official jq documentation](https://j
404404
Authentication methods are `basic`, `bearer` and `digest`.
405405
The names of the respective parameters can be found [here](https://github.com/evcc-io/evcc/blob/master/plugin/http_auth.go#L23).
406406

407+
#### Authentication {#http-auth}
408+
409+
Various authentication methods are available for HTTP requests:
410+
411+
**Basic Authentication**:
412+
413+
```yaml
414+
auth:
415+
type: basic
416+
user: <username>
417+
password: <password>
418+
```
419+
420+
**Bearer Token** (e.g. for JWT):
421+
422+
```yaml
423+
auth:
424+
type: bearer
425+
token: <token>
426+
```
427+
428+
**Digest Authentication**:
429+
430+
```yaml
431+
auth:
432+
type: digest
433+
user: <username>
434+
password: <password>
435+
```
436+
437+
**Custom Authentication**:
438+
439+
For more complex authentication scenarios, custom authentication plugins can be developed.
440+
These are integrated via the `source` parameter:
441+
442+
```yaml
443+
auth:
444+
source: <plugin-name>
445+
user: <username>
446+
password: <password>
447+
# additional plugin-specific parameters
448+
```
449+
450+
This allows integration of devices with special authentication requirements without having to modify the entire HTTP plugin code.
451+
407452
:::important Important
408453
XML documents are automatically converted to JSON format internally, which can then be filtered with jq like a native JSON response.
409454
Attributes get the prefix `attr`.

0 commit comments

Comments
 (0)