This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 64844bca3e1 CAMEL-20924: camel-http - add oauth2scope parameter
64844bca3e1 is described below
commit 64844bca3e184a2f971aa85fe2ef4c1415147a67
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Jul 10 11:45:26 2024 +0200
CAMEL-20924: camel-http - add oauth2scope parameter
---
.../catalog/components/atmosphere-websocket.json | 5 +--
.../org/apache/camel/catalog/components/http.json | 7 ++--
.../org/apache/camel/catalog/components/https.json | 7 ++--
.../websocket/WebsocketEndpointConfigurer.java | 18 ----------
.../websocket/WebsocketEndpointUriFactory.java | 10 ++----
.../atmosphere/websocket/atmosphere-websocket.json | 5 +--
.../atmosphere/websocket/WebsocketEndpoint.java | 3 +-
.../camel/http/common/HttpCommonEndpoint.java | 12 +++++++
.../camel/http/common/HttpConfiguration.java | 12 +++++++
.../component/http/HttpEndpointConfigurer.java | 6 ++++
.../component/http/HttpEndpointUriFactory.java | 3 +-
.../org/apache/camel/component/http/http.json | 7 ++--
.../org/apache/camel/component/http/https.json | 7 ++--
.../AtmosphereWebsocketEndpointBuilderFactory.java | 42 ----------------------
.../endpoint/dsl/HttpEndpointBuilderFactory.java | 14 ++++++++
.../kotlin/components/AtmosphereWebsocketUriDsl.kt | 21 -----------
.../apache/camel/kotlin/components/HttpUriDsl.kt | 7 ++++
17 files changed, 75 insertions(+), 111 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
index e3229445b25..d58e122b2c6 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
@@ -71,9 +71,6 @@
"optionsEnabled": { "index": 24, "kind": "parameter", "displayName":
"Options Enabled", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Specifies whether to enable HTTP OPTIONS
for this Servlet consumer. By default OPTIONS is turned off." },
"traceEnabled": { "index": 25, "kind": "parameter", "displayName": "Trace
Enabled", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"description": "Specifies whether to enable HTTP TRACE for this Servlet
consumer. By default TRACE is turned off." },
"bridgeEndpoint": { "index": 26, "kind": "parameter", "displayName":
"Bridge Endpoint", "group": "producer", "label": "producer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If the option is
true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the
endpoint's URI for request. You may also set the option throwExceptionOnFailure
to be false to let the HttpPro [...]
- "lazyStartProducer": { "index": 27, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
- "oauth2ClientId": { "index": 28, "kind": "parameter", "displayName":
"Oauth2 Client Id", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client id" },
- "oauth2ClientSecret": { "index": 29, "kind": "parameter", "displayName":
"Oauth2 Client Secret", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client secret" },
- "oauth2TokenEndpoint": { "index": 30, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" }
+ "lazyStartProducer": { "index": 27, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
index cb917b862ff..f9f71a0249a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
@@ -135,8 +135,9 @@
"authUsername": { "index": 48, "kind": "parameter", "displayName": "Auth
Username", "group": "security", "label": "producer,security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": true, "description": "Authentication username" },
"oauth2ClientId": { "index": 49, "kind": "parameter", "displayName":
"Oauth2 Client Id", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client id" },
"oauth2ClientSecret": { "index": 50, "kind": "parameter", "displayName":
"Oauth2 Client Secret", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client secret" },
- "oauth2TokenEndpoint": { "index": 51, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
- "sslContextParameters": { "index": 52, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
- "x509HostnameVerifier": { "index": 53, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
+ "oauth2Scope": { "index": 51, "kind": "parameter", "displayName": "Oauth2
Scope", "group": "security", "label": "producer,security", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "OAuth2 scope" },
+ "oauth2TokenEndpoint": { "index": 52, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
+ "sslContextParameters": { "index": 53, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
+ "x509HostnameVerifier": { "index": 54, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
}
}
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
index cc9bbcba573..ddf7d94231f 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
@@ -135,8 +135,9 @@
"authUsername": { "index": 48, "kind": "parameter", "displayName": "Auth
Username", "group": "security", "label": "producer,security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": true, "description": "Authentication username" },
"oauth2ClientId": { "index": 49, "kind": "parameter", "displayName":
"Oauth2 Client Id", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client id" },
"oauth2ClientSecret": { "index": 50, "kind": "parameter", "displayName":
"Oauth2 Client Secret", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client secret" },
- "oauth2TokenEndpoint": { "index": 51, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
- "sslContextParameters": { "index": 52, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
- "x509HostnameVerifier": { "index": 53, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
+ "oauth2Scope": { "index": 51, "kind": "parameter", "displayName": "Oauth2
Scope", "group": "security", "label": "producer,security", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "OAuth2 scope" },
+ "oauth2TokenEndpoint": { "index": 52, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
+ "sslContextParameters": { "index": 53, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
+ "x509HostnameVerifier": { "index": 54, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
}
}
diff --git
a/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointConfigurer.java
b/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointConfigurer.java
index 233e9e21225..a95c9e1651c 100644
---
a/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointConfigurer.java
+++
b/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointConfigurer.java
@@ -27,12 +27,6 @@ public class WebsocketEndpointConfigurer extends
ServletEndpointConfigurer imple
case "bridgeEndpoint": target.setBridgeEndpoint(property(camelContext,
boolean.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer":
target.setLazyStartProducer(property(camelContext, boolean.class, value));
return true;
- case "oauth2clientid":
- case "oauth2ClientId": target.setOauth2ClientId(property(camelContext,
java.lang.String.class, value)); return true;
- case "oauth2clientsecret":
- case "oauth2ClientSecret":
target.setOauth2ClientSecret(property(camelContext, java.lang.String.class,
value)); return true;
- case "oauth2tokenendpoint":
- case "oauth2TokenEndpoint":
target.setOauth2TokenEndpoint(property(camelContext, java.lang.String.class,
value)); return true;
case "sendtoall":
case "sendToAll": target.setSendToAll(property(camelContext,
boolean.class, value)); return true;
case "usestreaming":
@@ -48,12 +42,6 @@ public class WebsocketEndpointConfigurer extends
ServletEndpointConfigurer imple
case "bridgeEndpoint": return boolean.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
- case "oauth2clientid":
- case "oauth2ClientId": return java.lang.String.class;
- case "oauth2clientsecret":
- case "oauth2ClientSecret": return java.lang.String.class;
- case "oauth2tokenendpoint":
- case "oauth2TokenEndpoint": return java.lang.String.class;
case "sendtoall":
case "sendToAll": return boolean.class;
case "usestreaming":
@@ -70,12 +58,6 @@ public class WebsocketEndpointConfigurer extends
ServletEndpointConfigurer imple
case "bridgeEndpoint": return target.isBridgeEndpoint();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
- case "oauth2clientid":
- case "oauth2ClientId": return target.getOauth2ClientId();
- case "oauth2clientsecret":
- case "oauth2ClientSecret": return target.getOauth2ClientSecret();
- case "oauth2tokenendpoint":
- case "oauth2TokenEndpoint": return target.getOauth2TokenEndpoint();
case "sendtoall":
case "sendToAll": return target.isSendToAll();
case "usestreaming":
diff --git
a/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointUriFactory.java
b/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointUriFactory.java
index 260873fc718..d65bdb97a77 100644
---
a/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointUriFactory.java
+++
b/components/camel-atmosphere-websocket/src/generated/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpointUriFactory.java
@@ -23,7 +23,7 @@ public class WebsocketEndpointUriFactory extends
org.apache.camel.support.compon
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(31);
+ Set<String> props = new HashSet<>(28);
props.add("async");
props.add("attachmentMultipartBinding");
props.add("bridgeEndpoint");
@@ -44,9 +44,6 @@ public class WebsocketEndpointUriFactory extends
org.apache.camel.support.compon
props.add("mapHttpMessageHeaders");
props.add("matchOnUriPrefix");
props.add("muteException");
- props.add("oauth2ClientId");
- props.add("oauth2ClientSecret");
- props.add("oauth2TokenEndpoint");
props.add("optionsEnabled");
props.add("responseBufferSize");
props.add("sendToAll");
@@ -56,10 +53,7 @@ public class WebsocketEndpointUriFactory extends
org.apache.camel.support.compon
props.add("transferException");
props.add("useStreaming");
PROPERTY_NAMES = Collections.unmodifiableSet(props);
- Set<String> secretProps = new HashSet<>(2);
- secretProps.add("oauth2ClientId");
- secretProps.add("oauth2ClientSecret");
- SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
+ SECRET_PROPERTY_NAMES = Collections.emptySet();
MULTI_VALUE_PREFIXES = Collections.emptySet();
}
diff --git
a/components/camel-atmosphere-websocket/src/generated/resources/META-INF/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
b/components/camel-atmosphere-websocket/src/generated/resources/META-INF/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
index e3229445b25..d58e122b2c6 100644
---
a/components/camel-atmosphere-websocket/src/generated/resources/META-INF/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
+++
b/components/camel-atmosphere-websocket/src/generated/resources/META-INF/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
@@ -71,9 +71,6 @@
"optionsEnabled": { "index": 24, "kind": "parameter", "displayName":
"Options Enabled", "group": "consumer (advanced)", "label":
"consumer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Specifies whether to enable HTTP OPTIONS
for this Servlet consumer. By default OPTIONS is turned off." },
"traceEnabled": { "index": 25, "kind": "parameter", "displayName": "Trace
Enabled", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"description": "Specifies whether to enable HTTP TRACE for this Servlet
consumer. By default TRACE is turned off." },
"bridgeEndpoint": { "index": 26, "kind": "parameter", "displayName":
"Bridge Endpoint", "group": "producer", "label": "producer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If the option is
true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the
endpoint's URI for request. You may also set the option throwExceptionOnFailure
to be false to let the HttpPro [...]
- "lazyStartProducer": { "index": 27, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
- "oauth2ClientId": { "index": 28, "kind": "parameter", "displayName":
"Oauth2 Client Id", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client id" },
- "oauth2ClientSecret": { "index": 29, "kind": "parameter", "displayName":
"Oauth2 Client Secret", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client secret" },
- "oauth2TokenEndpoint": { "index": 30, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" }
+ "lazyStartProducer": { "index": 27, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
}
}
diff --git
a/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
b/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
index fdf8894059b..186ddae6813 100644
---
a/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
+++
b/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
@@ -40,7 +40,8 @@ import org.apache.camel.util.StringHelper;
@Metadata(excludeProperties =
"httpUri,contextPath,cookieHandler,connectionClose,authMethod,authMethodPriority,authUsername,authPassword,authDomain,authHost,"
+
"copyHeaders,httpMethod,ignoreResponseBody,preserveHostHeader,throwExceptionOnFailure,okStatusCodeRange,"
+
"proxyAuthScheme,proxyAuthMethod,proxyAuthUsername,proxyAuthPassword,proxyAuthHost,proxyAuthPort,proxyAuthDomain,"
- +
"proxyAuthNtHost,proxyAuthScheme,proxyHost,proxyPort",
+ +
"proxyAuthNtHost,proxyAuthScheme,proxyHost,proxyPort,"
+ +
"oauth2ClientId,oauth2ClientSecret,oauth2TokenEndpoint,oauth2Scope",
annotations = {
"protocol=http",
})
diff --git
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
index 157eadfdcbc..cddef8cb34d 100644
---
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
+++
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
@@ -161,6 +161,8 @@ public abstract class HttpCommonEndpoint extends
DefaultEndpoint
private String oauth2ClientSecret;
@UriParam(label = "producer,security", description = "OAuth2 Token
endpoint")
private String oauth2TokenEndpoint;
+ @UriParam(label = "producer,security", description = "OAuth2 scope")
+ private String oauth2Scope;
@UriParam(label = "producer,security", description = "Authentication
domain to use with NTML")
private String authDomain;
@UriParam(label = "producer,security", description = "Authentication host
to use with NTML")
@@ -832,4 +834,14 @@ public abstract class HttpCommonEndpoint extends
DefaultEndpoint
this.oauth2TokenEndpoint = oauth2TokenEndpoint;
}
+ public String getOauth2Scope() {
+ return oauth2Scope;
+ }
+
+ /**
+ * OAuth2 scope
+ */
+ public void setOauth2Scope(String oauth2Scope) {
+ this.oauth2Scope = oauth2Scope;
+ }
}
diff --git
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConfiguration.java
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConfiguration.java
index 4dbc0984414..c0a404ab59c 100644
---
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConfiguration.java
+++
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConfiguration.java
@@ -39,6 +39,8 @@ public class HttpConfiguration implements Serializable {
private String oauth2ClientSecret;
@Metadata(label = "producer,security", description = "OAuth2 token
endpoint")
private String oauth2TokenEndpoint;
+ @Metadata(label = "producer,security", description = "OAuth2 scope")
+ private String oauth2Scope;
@Metadata(label = "producer,security", description = "Authentication
domain to use with NTML")
private String authDomain;
@Metadata(label = "producer,security", description = "Authentication host
to use with NTML")
@@ -260,4 +262,14 @@ public class HttpConfiguration implements Serializable {
this.oauth2TokenEndpoint = oauth2TokenEndpoint;
}
+ public String getOauth2Scope() {
+ return oauth2Scope;
+ }
+
+ /**
+ * OAuth2 scope
+ */
+ public void setOauth2Scope(String oauth2Scope) {
+ this.oauth2Scope = oauth2Scope;
+ }
}
diff --git
a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java
b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java
index 765ae5ca7b0..07c2d800785 100644
---
a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java
+++
b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointConfigurer.java
@@ -89,6 +89,8 @@ public class HttpEndpointConfigurer extends
PropertyConfigurerSupport implements
case "oauth2ClientId": target.setOauth2ClientId(property(camelContext,
java.lang.String.class, value)); return true;
case "oauth2clientsecret":
case "oauth2ClientSecret":
target.setOauth2ClientSecret(property(camelContext, java.lang.String.class,
value)); return true;
+ case "oauth2scope":
+ case "oauth2Scope": target.setOauth2Scope(property(camelContext,
java.lang.String.class, value)); return true;
case "oauth2tokenendpoint":
case "oauth2TokenEndpoint":
target.setOauth2TokenEndpoint(property(camelContext, java.lang.String.class,
value)); return true;
case "okstatuscoderange":
@@ -202,6 +204,8 @@ public class HttpEndpointConfigurer extends
PropertyConfigurerSupport implements
case "oauth2ClientId": return java.lang.String.class;
case "oauth2clientsecret":
case "oauth2ClientSecret": return java.lang.String.class;
+ case "oauth2scope":
+ case "oauth2Scope": return java.lang.String.class;
case "oauth2tokenendpoint":
case "oauth2TokenEndpoint": return java.lang.String.class;
case "okstatuscoderange":
@@ -316,6 +320,8 @@ public class HttpEndpointConfigurer extends
PropertyConfigurerSupport implements
case "oauth2ClientId": return target.getOauth2ClientId();
case "oauth2clientsecret":
case "oauth2ClientSecret": return target.getOauth2ClientSecret();
+ case "oauth2scope":
+ case "oauth2Scope": return target.getOauth2Scope();
case "oauth2tokenendpoint":
case "oauth2TokenEndpoint": return target.getOauth2TokenEndpoint();
case "okstatuscoderange":
diff --git
a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java
b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java
index 8ae98baa696..76185081941 100644
---
a/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java
+++
b/components/camel-http/src/generated/java/org/apache/camel/component/http/HttpEndpointUriFactory.java
@@ -24,7 +24,7 @@ public class HttpEndpointUriFactory extends
org.apache.camel.support.component.E
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(54);
+ Set<String> props = new HashSet<>(55);
props.add("authDomain");
props.add("authHost");
props.add("authMethod");
@@ -59,6 +59,7 @@ public class HttpEndpointUriFactory extends
org.apache.camel.support.component.E
props.add("maxTotalConnections");
props.add("oauth2ClientId");
props.add("oauth2ClientSecret");
+ props.add("oauth2Scope");
props.add("oauth2TokenEndpoint");
props.add("okStatusCodeRange");
props.add("preserveHostHeader");
diff --git
a/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/http.json
b/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/http.json
index cb917b862ff..f9f71a0249a 100644
---
a/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/http.json
+++
b/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/http.json
@@ -135,8 +135,9 @@
"authUsername": { "index": 48, "kind": "parameter", "displayName": "Auth
Username", "group": "security", "label": "producer,security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": true, "description": "Authentication username" },
"oauth2ClientId": { "index": 49, "kind": "parameter", "displayName":
"Oauth2 Client Id", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client id" },
"oauth2ClientSecret": { "index": 50, "kind": "parameter", "displayName":
"Oauth2 Client Secret", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client secret" },
- "oauth2TokenEndpoint": { "index": 51, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
- "sslContextParameters": { "index": 52, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
- "x509HostnameVerifier": { "index": 53, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
+ "oauth2Scope": { "index": 51, "kind": "parameter", "displayName": "Oauth2
Scope", "group": "security", "label": "producer,security", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "OAuth2 scope" },
+ "oauth2TokenEndpoint": { "index": 52, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
+ "sslContextParameters": { "index": 53, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
+ "x509HostnameVerifier": { "index": 54, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
}
}
diff --git
a/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/https.json
b/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/https.json
index cc9bbcba573..ddf7d94231f 100644
---
a/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/https.json
+++
b/components/camel-http/src/generated/resources/META-INF/org/apache/camel/component/http/https.json
@@ -135,8 +135,9 @@
"authUsername": { "index": 48, "kind": "parameter", "displayName": "Auth
Username", "group": "security", "label": "producer,security", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": true, "description": "Authentication username" },
"oauth2ClientId": { "index": 49, "kind": "parameter", "displayName":
"Oauth2 Client Id", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client id" },
"oauth2ClientSecret": { "index": 50, "kind": "parameter", "displayName":
"Oauth2 Client Secret", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": true, "description": "OAuth2
client secret" },
- "oauth2TokenEndpoint": { "index": 51, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
- "sslContextParameters": { "index": 52, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
- "x509HostnameVerifier": { "index": 53, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
+ "oauth2Scope": { "index": 51, "kind": "parameter", "displayName": "Oauth2
Scope", "group": "security", "label": "producer,security", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "description": "OAuth2 scope" },
+ "oauth2TokenEndpoint": { "index": 52, "kind": "parameter", "displayName":
"Oauth2 Token Endpoint", "group": "security", "label": "producer,security",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description":
"OAuth2 Token endpoint" },
+ "sslContextParameters": { "index": 53, "kind": "parameter", "displayName":
"Ssl Context Parameters", "group": "security", "label": "security", "required":
false, "type": "object", "javaType":
"org.apache.camel.support.jsse.SSLContextParameters", "deprecated": false,
"autowired": false, "secret": false, "description": "To configure security
using SSLContextParameters. Important: Only one instance of
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent.
If you [...]
+ "x509HostnameVerifier": { "index": 54, "kind": "parameter", "displayName":
"X509 Hostname Verifier", "group": "security", "label": "security", "required":
false, "type": "object", "javaType": "javax.net.ssl.HostnameVerifier",
"deprecated": false, "autowired": false, "secret": false, "description": "To
use a custom X509HostnameVerifier such as DefaultHostnameVerifier or
NoopHostnameVerifier" }
}
}
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
index 387aebb04cd..3a69ba313a0 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
@@ -1123,48 +1123,6 @@ public interface
AtmosphereWebsocketEndpointBuilderFactory {
doSetProperty("bridgeEndpoint", bridgeEndpoint);
return this;
}
- /**
- * OAuth2 client id.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: security
- *
- * @param oauth2ClientId the value to set
- * @return the dsl builder
- */
- default AtmosphereWebsocketEndpointProducerBuilder
oauth2ClientId(String oauth2ClientId) {
- doSetProperty("oauth2ClientId", oauth2ClientId);
- return this;
- }
- /**
- * OAuth2 client secret.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: security
- *
- * @param oauth2ClientSecret the value to set
- * @return the dsl builder
- */
- default AtmosphereWebsocketEndpointProducerBuilder
oauth2ClientSecret(String oauth2ClientSecret) {
- doSetProperty("oauth2ClientSecret", oauth2ClientSecret);
- return this;
- }
- /**
- * OAuth2 Token endpoint.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: security
- *
- * @param oauth2TokenEndpoint the value to set
- * @return the dsl builder
- */
- default AtmosphereWebsocketEndpointProducerBuilder
oauth2TokenEndpoint(String oauth2TokenEndpoint) {
- doSetProperty("oauth2TokenEndpoint", oauth2TokenEndpoint);
- return this;
- }
}
/**
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
index f640d702ca1..ce7798d485e 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
@@ -624,6 +624,20 @@ public interface HttpEndpointBuilderFactory {
doSetProperty("oauth2ClientSecret", oauth2ClientSecret);
return this;
}
+ /**
+ * OAuth2 scope.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param oauth2Scope the value to set
+ * @return the dsl builder
+ */
+ default HttpEndpointBuilder oauth2Scope(String oauth2Scope) {
+ doSetProperty("oauth2Scope", oauth2Scope);
+ return this;
+ }
/**
* OAuth2 Token endpoint.
*
diff --git
a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt
b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt
index fd746e3513e..249bb879784 100644
---
a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt
+++
b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt
@@ -469,25 +469,4 @@ public class AtmosphereWebsocketUriDsl(
public fun lazyStartProducer(lazyStartProducer: Boolean) {
it.property("lazyStartProducer", lazyStartProducer.toString())
}
-
- /**
- * OAuth2 client id
- */
- public fun oauth2ClientId(oauth2ClientId: String) {
- it.property("oauth2ClientId", oauth2ClientId)
- }
-
- /**
- * OAuth2 client secret
- */
- public fun oauth2ClientSecret(oauth2ClientSecret: String) {
- it.property("oauth2ClientSecret", oauth2ClientSecret)
- }
-
- /**
- * OAuth2 Token endpoint
- */
- public fun oauth2TokenEndpoint(oauth2TokenEndpoint: String) {
- it.property("oauth2TokenEndpoint", oauth2TokenEndpoint)
- }
}
diff --git
a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt
b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt
index cdf38d90514..a1283611219 100644
---
a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt
+++
b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt
@@ -619,6 +619,13 @@ public class HttpUriDsl(
it.property("oauth2ClientSecret", oauth2ClientSecret)
}
+ /**
+ * OAuth2 scope
+ */
+ public fun oauth2Scope(oauth2Scope: String) {
+ it.property("oauth2Scope", oauth2Scope)
+ }
+
/**
* OAuth2 Token endpoint
*/