This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 4cd60d0e25da1a28e47d1a5d5a04792a1bcb3d61 Author: Andrea Cosentino <[email protected]> AuthorDate: Mon Sep 9 07:46:15 2024 +0200 Support OAuth in HTTP Kamelets - HTTP Source Signed-off-by: Andrea Cosentino <[email protected]> --- kamelets/http-secured-source.kamelet.yaml | 37 +++++++++++++++++++--- .../kamelets/http-secured-source.kamelet.yaml | 37 +++++++++++++++++++--- 2 files changed, 66 insertions(+), 8 deletions(-) diff --git a/kamelets/http-secured-source.kamelet.yaml b/kamelets/http-secured-source.kamelet.yaml index efb2b12e..0284a9d3 100644 --- a/kamelets/http-secured-source.kamelet.yaml +++ b/kamelets/http-secured-source.kamelet.yaml @@ -56,7 +56,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. @@ -75,6 +74,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" @@ -92,8 +117,12 @@ 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}}" - to: "kamelet:sink" 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 efb2b12e..0284a9d3 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 @@ -56,7 +56,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. @@ -75,6 +74,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" @@ -92,8 +117,12 @@ 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}}" - to: "kamelet:sink"
