Skip to content

Commit

Permalink
Fix Documentation for OAuth2 and HttpClientConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
trobanga committed Jan 27, 2025
1 parent 35d3194 commit 2864fc0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 12 deletions.
19 changes: 19 additions & 0 deletions clinical-domain-agent/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
# password: "{noop}2mXA742aw7CGaLU6"
# # Role assigned to the user
# role: client
##! https://medizininformatik-initiative.github.io/fts-next/configuration/security/oauth2
# auth.oauth2:
# issuer: http://localhost:8080/realms/fts
# client-id: client
##! https://medizininformatik-initiative.github.io/fts-next/configuration/security/client-certs
# auth.clientCert:
# users:
Expand All @@ -79,6 +83,21 @@
# # Role assigned to the user
# role: client

### Spring OAuth2 Client Security Configuration
##! https://medizininformatik-initiative.github.io/fts-next/configuration/
# security:
# oauth2:
# client:
# registration:
# agent:
# authorization-grant-type: client_credentials
# client-id: cd-client
# client-secret: tIQfOvBuhyR1dw9OQ3E4tCeTvcHtiW84
# provider: keycloak
# provider:
# keycloak:
# issuer-uri: http://localhost:8080/realms/fts

### Monitoring
##! https://medizininformatik-initiative.github.io/fts-next/configuration/observability
# management:
Expand Down
37 changes: 25 additions & 12 deletions docs/types/HttpClientConfig.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
# HttpClientConfig

## Example
## Examples

### Basic Auth

```yaml
baseUrl: http://rd-hds:8080/fhir
auth:
basic:
user: "mario"
password: "itsame"
ssl:
bundle: client
```
### OAuth2
```yaml
baseUrl: http://rd-hds:8080/fhir
auth:
basic:
user: "mario"
password: "itsame"
ssl:
bundle: client
baseUrl: http://rd-hds:8080/fhir
auth:
oauth2:
registration: agent
ssl:
bundle: client
```
## Fields
Expand Down Expand Up @@ -45,10 +58,9 @@

### HttpClientOauth2Auth

| Field Name | Type | Required | Default | Description |
|------------|----------|----------|---------|---------------------------------|
| `issuer` | `String` | Yes | | URL of the authorization server |
| `clientId` | `String` | Yes | | The clientId |
| Field Name | Type | Required | Default | Description |
|----------------|----------|----------|---------|--------------------------------------------------------------|
| `registration` | `String` | Yes | | Name of the registration configuration in `application.yaml` |

### HttpClientCookieTokenAuth

Expand All @@ -59,3 +71,4 @@
## References

* [RFC 7617 The 'Basic' HTTP Authentication Scheme](https://datatracker.ietf.org/doc/html/rfc7617)
* [RFC 6749 The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749)

0 comments on commit 2864fc0

Please sign in to comment.