This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch http-oauth in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 97b9015ab4d98fada9497d274b85ec7f797b08ca Author: Andrea Cosentino <[email protected]> AuthorDate: Mon Sep 9 07:53:02 2024 +0200 Support OAuth in HTTP Kamelets - Docs Signed-off-by: Andrea Cosentino <[email protected]> --- kamelets/http-secured-sink.kamelet.yaml | 2 +- kamelets/http-secured-source.kamelet.yaml | 2 +- .../kamelets/http-secured-sink.kamelet.yaml | 39 +++++++++++++++++++--- .../kamelets/http-secured-source.kamelet.yaml | 2 +- 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/kamelets/http-secured-sink.kamelet.yaml b/kamelets/http-secured-sink.kamelet.yaml index 774b742e..f8d4c014 100644 --- a/kamelets/http-secured-sink.kamelet.yaml +++ b/kamelets/http-secured-sink.kamelet.yaml @@ -30,7 +30,7 @@ metadata: spec: definition: title: Secured HTTP Sink - description: Forwards an event to a secured HTTP endpoint + description: Forwards an event to a secured HTTP endpoint. Supports Oauth and Basic authentication. required: - url type: object diff --git a/kamelets/http-secured-source.kamelet.yaml b/kamelets/http-secured-source.kamelet.yaml index 0284a9d3..e2cb2dd0 100644 --- a/kamelets/http-secured-source.kamelet.yaml +++ b/kamelets/http-secured-source.kamelet.yaml @@ -31,7 +31,7 @@ spec: definition: title: "HTTP Secured Source" description: |- - Periodically fetches a secured HTTP resource and provides the content as output. + Periodically fetches a secured HTTP resource and provides the content as output. Supports Oauth and Basic authentication. required: - url type: object diff --git a/library/camel-kamelets/src/main/resources/kamelets/http-secured-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/http-secured-sink.kamelet.yaml index 61e938e8..f8d4c014 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/http-secured-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/http-secured-sink.kamelet.yaml @@ -30,7 +30,7 @@ metadata: spec: definition: title: Secured HTTP Sink - description: Forwards an event to a secured HTTP endpoint + description: Forwards an event to a secured HTTP endpoint. Supports Oauth and Basic authentication. required: - url type: object @@ -51,7 +51,6 @@ spec: title: Authentication Method description: Authentication methods allowed to use as a comma separated list of values Basic, Digest or NTLM. type: string - default: "Basic" authenticationPreemptive: title: Authentication Preemptive description: If this option is true, camel-http sends preemptive basic authentication to the server. @@ -70,6 +69,32 @@ spec: format: password x-descriptors: - urn:camel:group:credentials + oauth2ClientId: + title: Oauth2 Client Id + description: Oauth2 Client Id + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauth2ClientSecret: + title: Oauth2 Client Secret + description: Oauth2 Client Secret + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + oauth2TokenEndpoint: + title: Oauth2 Token Endpoint + description: Oauth2 Token Endpoint + type: string + x-descriptors: + - urn:camel:group:credentials + oauth2Scope: + title: Oauth2 Scope + description: Oauth2 Scope + type: string + x-descriptors: + - urn:camel:group:credentials dependencies: - "camel:http" - "camel:kamelet" @@ -86,7 +111,11 @@ spec: - to: uri: "{{url}}" parameters: - authMethod: "{{authMethod}}" - authUsername: "{{authUsername}}" - authPassword: "{{authPassword}}" + authMethod: "{{?authMethod}}" + authUsername: "{{?authUsername}}" + authPassword: "{{?authPassword}}" + oauth2ClientId: "{{?oauth2ClientId}}" + oauth2ClientSecret: "{{?oauth2ClientSecret}}" + oauth2Scope: "{{?oauth2Scope}}" + oauth2TokenEndpoint: "{{?oauth2TokenEndpoint}}" authenticationPreemptive: "{{authenticationPreemptive}}" diff --git a/library/camel-kamelets/src/main/resources/kamelets/http-secured-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/http-secured-source.kamelet.yaml index 0284a9d3..e2cb2dd0 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/http-secured-source.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/http-secured-source.kamelet.yaml @@ -31,7 +31,7 @@ spec: definition: title: "HTTP Secured Source" description: |- - Periodically fetches a secured HTTP resource and provides the content as output. + Periodically fetches a secured HTTP resource and provides the content as output. Supports Oauth and Basic authentication. required: - url type: object
