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 52572f14c15 camel-http: Remove unusued option 52572f14c15 is described below commit 52572f14c15fd5078c93c4c1217b93437cd1551a Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sat May 24 07:54:04 2025 +0200 camel-http: Remove unusued option --- .../org/apache/camel/catalog/components/http.json | 25 ++-- .../org/apache/camel/catalog/components/https.json | 25 ++-- .../atmosphere/websocket/WebsocketEndpoint.java | 2 +- .../camel/http/common/HttpCommonEndpoint.java | 14 -- .../camel/http/common/HttpConfiguration.java | 14 -- .../component/http/HttpEndpointConfigurer.java | 6 - .../component/http/HttpEndpointUriFactory.java | 3 +- .../org/apache/camel/component/http/http.json | 25 ++-- .../org/apache/camel/component/http/https.json | 25 ++-- .../component/jetty12/JettyHttpEndpoint12.java | 2 +- .../jetty/HttpAuthMethodPriorityTest.java | 142 --------------------- .../endpoint/dsl/HttpEndpointBuilderFactory.java | 15 --- 12 files changed, 51 insertions(+), 247 deletions(-) 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 02056583d25..b70dc48d1dd 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 @@ -140,18 +140,17 @@ "authenticationPreemptive": { "index": 48, "kind": "parameter", "displayName": "Authentication Preemptive", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If this option is true, camel-http sends preemptive basic authentication to the server." }, "authHost": { "index": 49, "kind": "parameter", "displayName": "Auth Host", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "Authentication host to use with NTLM" }, "authMethod": { "index": 50, "kind": "parameter", "displayName": "Auth Method", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Authentication methods allowed to use as a comma separated list of values Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authMethodPriority": { "index": 51, "kind": "parameter", "displayName": "Auth Method Priority", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Which authentication method to prioritize to use, either as Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authPassword": { "index": 52, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, - "authUsername": { "index": 53, "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" }, - "oauth2CachedTokensDefaultExpirySeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, - "oauth2CachedTokensExpirationMarginSeconds": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] - "oauth2CacheTokens": { "index": 56, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, - "oauth2ClientId": { "index": 57, "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": 58, "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" }, - "oauth2ResourceIndicator": { "index": 59, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, - "oauth2Scope": { "index": 60, "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": 61, "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 Resource Indicator" }, - "sslContextParameters": { "index": 62, "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": 63, "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" } + "authPassword": { "index": 51, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, + "authUsername": { "index": 52, "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" }, + "oauth2CachedTokensDefaultExpirySeconds": { "index": 53, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, + "oauth2CachedTokensExpirationMarginSeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] + "oauth2CacheTokens": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, + "oauth2ClientId": { "index": 56, "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": 57, "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" }, + "oauth2ResourceIndicator": { "index": 58, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, + "oauth2Scope": { "index": 59, "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": 60, "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 Resource Indicator" }, + "sslContextParameters": { "index": 61, "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": 62, "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 733d6d39eba..295bbb5ccdb 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 @@ -140,18 +140,17 @@ "authenticationPreemptive": { "index": 48, "kind": "parameter", "displayName": "Authentication Preemptive", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If this option is true, camel-http sends preemptive basic authentication to the server." }, "authHost": { "index": 49, "kind": "parameter", "displayName": "Auth Host", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "Authentication host to use with NTLM" }, "authMethod": { "index": 50, "kind": "parameter", "displayName": "Auth Method", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Authentication methods allowed to use as a comma separated list of values Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authMethodPriority": { "index": 51, "kind": "parameter", "displayName": "Auth Method Priority", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Which authentication method to prioritize to use, either as Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authPassword": { "index": 52, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, - "authUsername": { "index": 53, "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" }, - "oauth2CachedTokensDefaultExpirySeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, - "oauth2CachedTokensExpirationMarginSeconds": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] - "oauth2CacheTokens": { "index": 56, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, - "oauth2ClientId": { "index": 57, "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": 58, "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" }, - "oauth2ResourceIndicator": { "index": 59, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, - "oauth2Scope": { "index": 60, "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": 61, "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 Resource Indicator" }, - "sslContextParameters": { "index": 62, "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": 63, "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" } + "authPassword": { "index": 51, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, + "authUsername": { "index": 52, "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" }, + "oauth2CachedTokensDefaultExpirySeconds": { "index": 53, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, + "oauth2CachedTokensExpirationMarginSeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] + "oauth2CacheTokens": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, + "oauth2ClientId": { "index": 56, "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": 57, "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" }, + "oauth2ResourceIndicator": { "index": 58, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, + "oauth2Scope": { "index": 59, "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": 60, "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 Resource Indicator" }, + "sslContextParameters": { "index": 61, "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": 62, "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/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 93651e17097..c955833e8c9 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 @@ -37,7 +37,7 @@ import org.apache.camel.util.StringHelper; title = "Atmosphere Websocket", syntax = "atmosphere-websocket:servicePath", category = { Category.HTTP, Category.NETWORKING }, headersClass = WebsocketConstants.class) -@Metadata(excludeProperties = "httpUri,contextPath,cookieHandler,connectionClose,authMethod,authMethodPriority,authUsername,authPassword,authDomain,authHost,authBearerToken," +@Metadata(excludeProperties = "httpUri,contextPath,cookieHandler,connectionClose,authMethod,authUsername,authPassword,authDomain,authHost,authBearerToken," + "copyHeaders,httpMethod,ignoreResponseBody,preserveHostHeader,throwExceptionOnFailure,okStatusCodeRange," + "proxyAuthScheme,proxyAuthMethod,proxyAuthUsername,proxyAuthPassword,proxyAuthHost,proxyAuthPort,proxyAuthDomain," + "proxyAuthNtHost,proxyAuthScheme,proxyHost,proxyPort," 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 2936a111083..330ca59a21d 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 @@ -145,9 +145,6 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint @UriParam(label = "producer,security", enums = "Basic,Bearer,NTLM", description = "Authentication methods allowed to use as a comma separated list of values Basic, Bearer, or NTLM. (NTLM is deprecated)") private String authMethod; - @UriParam(label = "producer,security", enums = "Basic,Bearer,NTLM", - description = "Which authentication method to prioritize to use, either as Basic, Bearer, or NTLM. (NTLM is deprecated)") - private String authMethodPriority; @UriParam(label = "producer,security", secret = true, description = "Authentication username") private String authUsername; @UriParam(label = "producer,security", secret = true, description = "Authentication bearer token") @@ -654,17 +651,6 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint this.authMethod = authMethod; } - public String getAuthMethodPriority() { - return authMethodPriority; - } - - /** - * Which authentication method to prioritize to use, either as Basic, Bearer or NTLM (deprecated). - */ - public void setAuthMethodPriority(String authMethodPriority) { - this.authMethodPriority = authMethodPriority; - } - public String getAuthUsername() { return authUsername; } 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 b84132714fe..43838911014 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 @@ -27,9 +27,6 @@ public class HttpConfiguration implements Serializable { @Metadata(label = "producer,security", description = "Authentication methods allowed to use as a comma separated list of values Basic, or NTLM. (NTLM is deprecated)") private String authMethod; - @Metadata(label = "producer,security", enums = "Basic,Bearer,NTLM", - description = "Which authentication method to prioritize to use, either as Basic, Bearer, or NTLM. (NTLM is deprecated)") - private String authMethodPriority; @Metadata(label = "producer,security", secret = true, description = "Authentication username") private String authUsername; @Metadata(label = "producer,security", secret = true, description = "Authentication password") @@ -96,17 +93,6 @@ public class HttpConfiguration implements Serializable { this.authMethod = authMethod; } - public String getAuthMethodPriority() { - return authMethodPriority; - } - - /** - * Which authentication method to prioritize to use, either as Basic, Bearer or NTLM (deprecated). - */ - public void setAuthMethodPriority(String authMethodPriority) { - this.authMethodPriority = authMethodPriority; - } - public String getAuthUsername() { return authUsername; } 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 2d2fc64d1cb..83cdd9e3608 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 @@ -31,8 +31,6 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements case "authHost": target.setAuthHost(property(camelContext, java.lang.String.class, value)); return true; case "authmethod": case "authMethod": target.setAuthMethod(property(camelContext, java.lang.String.class, value)); return true; - case "authmethodpriority": - case "authMethodPriority": target.setAuthMethodPriority(property(camelContext, java.lang.String.class, value)); return true; case "authpassword": case "authPassword": target.setAuthPassword(property(camelContext, java.lang.String.class, value)); return true; case "authusername": @@ -164,8 +162,6 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements case "authHost": return java.lang.String.class; case "authmethod": case "authMethod": return java.lang.String.class; - case "authmethodpriority": - case "authMethodPriority": return java.lang.String.class; case "authpassword": case "authPassword": return java.lang.String.class; case "authusername": @@ -298,8 +294,6 @@ public class HttpEndpointConfigurer extends PropertyConfigurerSupport implements case "authHost": return target.getAuthHost(); case "authmethod": case "authMethod": return target.getAuthMethod(); - case "authmethodpriority": - case "authMethodPriority": return target.getAuthMethodPriority(); case "authpassword": case "authPassword": return target.getAuthPassword(); case "authusername": 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 9138d8da85c..459f3f344ed 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,12 +24,11 @@ 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<>(64); + Set<String> props = new HashSet<>(63); props.add("authBearerToken"); props.add("authDomain"); props.add("authHost"); props.add("authMethod"); - props.add("authMethodPriority"); props.add("authPassword"); props.add("authUsername"); props.add("authenticationPreemptive"); 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 02056583d25..b70dc48d1dd 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 @@ -140,18 +140,17 @@ "authenticationPreemptive": { "index": 48, "kind": "parameter", "displayName": "Authentication Preemptive", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If this option is true, camel-http sends preemptive basic authentication to the server." }, "authHost": { "index": 49, "kind": "parameter", "displayName": "Auth Host", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "Authentication host to use with NTLM" }, "authMethod": { "index": 50, "kind": "parameter", "displayName": "Auth Method", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Authentication methods allowed to use as a comma separated list of values Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authMethodPriority": { "index": 51, "kind": "parameter", "displayName": "Auth Method Priority", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Which authentication method to prioritize to use, either as Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authPassword": { "index": 52, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, - "authUsername": { "index": 53, "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" }, - "oauth2CachedTokensDefaultExpirySeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, - "oauth2CachedTokensExpirationMarginSeconds": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] - "oauth2CacheTokens": { "index": 56, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, - "oauth2ClientId": { "index": 57, "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": 58, "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" }, - "oauth2ResourceIndicator": { "index": 59, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, - "oauth2Scope": { "index": 60, "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": 61, "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 Resource Indicator" }, - "sslContextParameters": { "index": 62, "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": 63, "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" } + "authPassword": { "index": 51, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, + "authUsername": { "index": 52, "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" }, + "oauth2CachedTokensDefaultExpirySeconds": { "index": 53, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, + "oauth2CachedTokensExpirationMarginSeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] + "oauth2CacheTokens": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, + "oauth2ClientId": { "index": 56, "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": 57, "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" }, + "oauth2ResourceIndicator": { "index": 58, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, + "oauth2Scope": { "index": 59, "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": 60, "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 Resource Indicator" }, + "sslContextParameters": { "index": 61, "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": 62, "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 733d6d39eba..295bbb5ccdb 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 @@ -140,18 +140,17 @@ "authenticationPreemptive": { "index": 48, "kind": "parameter", "displayName": "Authentication Preemptive", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If this option is true, camel-http sends preemptive basic authentication to the server." }, "authHost": { "index": 49, "kind": "parameter", "displayName": "Auth Host", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "description": "Authentication host to use with NTLM" }, "authMethod": { "index": 50, "kind": "parameter", "displayName": "Auth Method", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Authentication methods allowed to use as a comma separated list of values Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authMethodPriority": { "index": 51, "kind": "parameter", "displayName": "Auth Method Priority", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "Basic", "Bearer", "NTLM" ], "deprecated": false, "autowired": false, "secret": false, "description": "Which authentication method to prioritize to use, either as Basic, Bearer, or NTLM. (NTLM is deprecated)" }, - "authPassword": { "index": 52, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, - "authUsername": { "index": 53, "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" }, - "oauth2CachedTokensDefaultExpirySeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, - "oauth2CachedTokensExpirationMarginSeconds": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] - "oauth2CacheTokens": { "index": 56, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, - "oauth2ClientId": { "index": 57, "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": 58, "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" }, - "oauth2ResourceIndicator": { "index": 59, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, - "oauth2Scope": { "index": 60, "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": 61, "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 Resource Indicator" }, - "sslContextParameters": { "index": 62, "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": 63, "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" } + "authPassword": { "index": 51, "kind": "parameter", "displayName": "Auth Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "Authentication password" }, + "authUsername": { "index": 52, "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" }, + "oauth2CachedTokensDefaultExpirySeconds": { "index": 53, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Default Expiry Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 3600, "description": "Default expiration time for cached OAuth2 tokens, in seconds. Used if token response does not contain 'expires_in' field." }, + "oauth2CachedTokensExpirationMarginSeconds": { "index": 54, "kind": "parameter", "displayName": "Oauth2 Cached Tokens Expiration Margin Seconds", "group": "security", "label": "producer,security", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 5, "description": "Amount of time which is deducted from OAuth2 tokens expiry time to compensate for the time it takes OAuth2 Token Endpoint to send the token [...] + "oauth2CacheTokens": { "index": 55, "kind": "parameter", "displayName": "Oauth2 Cache Tokens", "group": "security", "label": "producer,security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to cache OAuth2 client tokens." }, + "oauth2ClientId": { "index": 56, "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": 57, "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" }, + "oauth2ResourceIndicator": { "index": 58, "kind": "parameter", "displayName": "Oauth2 Resource Indicator", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "OAuth2 Token endpoint" }, + "oauth2Scope": { "index": 59, "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": 60, "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 Resource Indicator" }, + "sslContextParameters": { "index": 61, "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": 62, "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-jetty/src/main/java/org/apache/camel/component/jetty12/JettyHttpEndpoint12.java b/components/camel-jetty/src/main/java/org/apache/camel/component/jetty12/JettyHttpEndpoint12.java index 6a3662b93c5..daaa94f1973 100644 --- a/components/camel-jetty/src/main/java/org/apache/camel/component/jetty12/JettyHttpEndpoint12.java +++ b/components/camel-jetty/src/main/java/org/apache/camel/component/jetty12/JettyHttpEndpoint12.java @@ -34,7 +34,7 @@ import org.apache.camel.spi.UriEndpoint; @UriEndpoint(firstVersion = "1.2.0", scheme = "jetty", extendsScheme = "http", title = "Jetty", syntax = "jetty:httpUri", category = { Category.HTTP }, consumerOnly = true, lenientProperties = true, headersClass = JettyHttpConstants.class) -@Metadata(excludeProperties = "authMethod,authMethodPriority,authUsername,authPassword,authDomain,authHost,authBearerToken," +@Metadata(excludeProperties = "authMethod,authUsername,authPassword,authDomain,authHost,authBearerToken," + "proxyAuthScheme,proxyAuthMethod,proxyAuthUsername,proxyAuthPassword,proxyAuthHost,proxyAuthPort,proxyAuthDomain", annotations = { "protocol=http" diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java deleted file mode 100644 index 23a8deff016..00000000000 --- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpAuthMethodPriorityTest.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.jetty; - -import java.io.File; -import java.security.Principal; -import java.util.Arrays; - -import jakarta.servlet.http.HttpServletRequest; - -import org.apache.camel.BindToRegistry; -import org.apache.camel.Exchange; -import org.apache.camel.FailedToCreateProducerException; -import org.apache.camel.Processor; -import org.apache.camel.RuntimeCamelException; -import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.http.base.HttpOperationFailedException; -import org.eclipse.jetty.ee10.servlet.security.ConstraintMapping; -import org.eclipse.jetty.ee10.servlet.security.ConstraintSecurityHandler; -import org.eclipse.jetty.security.Constraint; -import org.eclipse.jetty.security.HashLoginService; -import org.eclipse.jetty.security.SecurityHandler; -import org.eclipse.jetty.security.authentication.BasicAuthenticator; -import org.eclipse.jetty.util.resource.URLResourceFactory; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.fail; - -@Disabled -public class HttpAuthMethodPriorityTest extends BaseJettyTest { - - @BindToRegistry("myAuthHandler") - public SecurityHandler getSecurityHandler() { - Constraint constraint = new Constraint.Builder() - .name("BASIC") - .roles("user") - .authorization(Constraint.Authorization.SPECIFIC_ROLE) - .build(); - - ConstraintMapping cm = new ConstraintMapping(); - cm.setPathSpec("/*"); - cm.setConstraint(constraint); - - ConstraintSecurityHandler sh = new ConstraintSecurityHandler(); - sh.setAuthenticator(new BasicAuthenticator()); - sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[] { cm })); - - HashLoginService loginService = new HashLoginService( - "MyRealm", - new URLResourceFactory().newResource( - new File("src/test/resources/myRealm.properties").toURI())); - sh.setLoginService(loginService); - sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[] { cm })); - - return sh; - } - - @Test - public void testAuthMethodPriorityBasicDigest() { - String out = template.requestBody( - "http://localhost:{{port}}/test?authMethod=Basic&authMethodPriority=Basic,Digest&authUsername=donald&authPassword=duck", - "Hello World", - String.class); - assertEquals("Bye World", out); - } - - @Test - public void testAuthMethodPriorityNTLMBasic() { - String out = template.requestBody( - "http://localhost:{{port}}/test?authMethod=Basic&authMethodPriority=NTLM,Basic&authUsername=donald&authPassword=duck", - "Hello World", - String.class); - assertEquals("Bye World", out); - } - - @Test - public void testAuthMethodPriorityInvalid() { - try { - template.requestBody( - "http://localhost:{{port}}/test?authMethod=Basic&authMethodPriority=Basic,foo&authUsername=donald&authPassword=duck", - "Hello World", String.class); - fail("Should have thrown an exception"); - } catch (FailedToCreateProducerException e) { - IllegalArgumentException cause - = assertIsInstanceOf(IllegalArgumentException.class, e.getCause().getCause().getCause()); - // JAXB 2.2 uses a slightly different message - boolean b = cause.getMessage().contains("No enum const") - && cause.getMessage().contains("org.apache.camel.component.http.AuthMethod.foo"); - assertTrue(b, "Bad fault message: " + cause.getMessage()); - } - } - - @Test - public void testAuthMethodPriorityNTLM() { - try { - template.requestBody( - "http://localhost:{{port}}/test?authMethod=Basic&authMethodPriority=NTLM&authUsername=donald&authPassword=duck", - "Hello World", String.class); - fail("Should have thrown exception"); - } catch (RuntimeCamelException e) { - HttpOperationFailedException cause = assertIsInstanceOf(HttpOperationFailedException.class, e.getCause()); - assertEquals(401, cause.getStatusCode()); - } - } - - @Override - protected RouteBuilder createRouteBuilder() { - return new RouteBuilder() { - @Override - public void configure() { - from("jetty://http://localhost:{{port}}/test?handlers=myAuthHandler").process(new Processor() { - public void process(Exchange exchange) { - HttpServletRequest req = exchange.getIn().getBody(HttpServletRequest.class); - assertNotNull(req); - Principal user = req.getUserPrincipal(); - assertNotNull(user); - assertEquals("donald", user.getName()); - } - }).transform(constant("Bye World")); - } - }; - } -} 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 9593b72a0be..b34e501a8db 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 @@ -658,21 +658,6 @@ public interface HttpEndpointBuilderFactory { doSetProperty("authMethod", authMethod); return this; } - /** - * Which authentication method to prioritize to use, either as Basic, - * Bearer, or NTLM. (NTLM is deprecated). - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: security - * - * @param authMethodPriority the value to set - * @return the dsl builder - */ - default HttpEndpointBuilder authMethodPriority(String authMethodPriority) { - doSetProperty("authMethodPriority", authMethodPriority); - return this; - } /** * Authentication password. *