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-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 1824e5ea873 Regen
1824e5ea873 is described below

commit 1824e5ea87329d2205155ca8598b817047a2a568
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Sep 30 07:40:34 2025 +0200

    Regen
---
 .../camel/springboot/catalog/components.properties |   1 +
 .../springboot/catalog/components/keycloak.json    |  65 +++++++
 .../src/main/docs/keycloak.json                    | 107 +++++++++++
 .../KeycloakComponentAutoConfiguration.java        |  77 ++++++++
 .../springboot/KeycloakComponentConfiguration.java | 198 +++++++++++++++++++++
 .../springboot/KeycloakComponentConverter.java     |  65 +++++++
 ...rk.boot.autoconfigure.AutoConfiguration.imports |  19 ++
 7 files changed, 532 insertions(+)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
index 6f97af3ce3b..79e0bd4ba85 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties
@@ -194,6 +194,7 @@ jt400
 jte
 kafka
 kamelet
+keycloak
 knative
 kserve
 kubernetes-config-maps
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/keycloak.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/keycloak.json
new file mode 100644
index 00000000000..2733c6bab8d
--- /dev/null
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/keycloak.json
@@ -0,0 +1,65 @@
+{
+  "component": {
+    "kind": "component",
+    "name": "keycloak",
+    "title": "Keycloak",
+    "description": "Manage Keycloak instances via Admin API.",
+    "deprecated": false,
+    "firstVersion": "4.15.0",
+    "label": "security,management",
+    "javaType": "org.apache.camel.component.keycloak.KeycloakComponent",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel.springboot",
+    "artifactId": "camel-keycloak-starter",
+    "version": "4.15.0-SNAPSHOT",
+    "scheme": "keycloak",
+    "extendsScheme": "",
+    "syntax": "keycloak:label",
+    "async": false,
+    "api": false,
+    "consumerOnly": false,
+    "producerOnly": true,
+    "lenientProperties": false,
+    "browsable": false,
+    "remote": true
+  },
+  "componentProperties": {
+    "clientId": { "index": 0, "kind": "property", "displayName": "Client Id", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak client ID" },
+    "clientSecret": { "index": 1, "kind": "property", "displayName": "Client 
Secret", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak client secret" 
},
+    "configuration": { "index": 2, "kind": "property", "displayName": 
"Configuration", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", "deprecated": 
false, "autowired": false, "secret": false, "description": "Component 
configuration" },
+    "keycloakClient": { "index": 3, "kind": "property", "displayName": 
"Keycloak Client", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": "org.keycloak.admin.client.Keycloak", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "To use an existing 
configured Keycloak admin client" },
+    "lazyStartProducer": { "index": 4, "kind": "property", "displayName": 
"Lazy Start Producer", "group": "producer", "label": "producer", "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 producer may otherwise fail [...]
+    "operation": { "index": 5, "kind": "property", "displayName": "Operation", 
"group": "producer", "label": "", "required": false, "type": "enum", 
"javaType": "org.apache.camel.component.keycloak.KeycloakOperations", "enum": [ 
"createRealm", "deleteRealm", "getRealm", "updateRealm", "createUser", 
"deleteUser", "getUser", "updateUser", "listUsers", "createRole", "deleteRole", 
"getRole", "updateRole", "listRoles", "assignRoleToUser", "removeRoleFromUser" 
], "deprecated": false, "autowired [...]
+    "password": { "index": 6, "kind": "property", "displayName": "Password", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak password" },
+    "pojoRequest": { "index": 7, "kind": "property", "displayName": "Pojo 
Request", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "If we want to use a POJO 
request as body or not" },
+    "realm": { "index": 8, "kind": "property", "displayName": "Realm", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak realm" },
+    "serverUrl": { "index": 9, "kind": "property", "displayName": "Server 
Url", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak server URL" },
+    "username": { "index": 10, "kind": "property", "displayName": "Username", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak username" },
+    "autowiredEnabled": { "index": 11, "kind": "property", "displayName": 
"Autowired Enabled", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, "description": 
"Whether autowiring is enabled. This is used for automatic autowiring options 
(the option must be marked as autowired) by looking up in the registry to find 
if there is a single instance of matching  [...]
+  },
+  "headers": {
+    "CamelKeycloakOperation": { "index": 0, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": 
"org.apache.camel.component.keycloak.KeycloakOperations", "enum": [ 
"createRealm", "deleteRealm", "getRealm", "updateRealm", "createUser", 
"deleteUser", "getUser", "updateUser", "listUsers", "createRole", "deleteRole", 
"getRole", "updateRole", "listRoles", "assignRoleToUser", "removeRoleFromUser" 
], "deprecated": false, "deprecationNote": "", " [...]
+    "CamelKeycloakRealmName": { "index": 1, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The realm name", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#REALM_NAME" },
+    "CamelKeycloakUserId": { "index": 2, "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The user ID", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#USER_ID" },
+    "CamelKeycloakUsername": { "index": 3, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The username", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#USERNAME" },
+    "CamelKeycloakUserEmail": { "index": 4, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The user email", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#USER_EMAIL" },
+    "CamelKeycloakUserFirstName": { "index": 5, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The user first name", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#USER_FIRST_NAME" },
+    "CamelKeycloakUserLastName": { "index": 6, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The user last name", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#USER_LAST_NAME" },
+    "CamelKeycloakRoleId": { "index": 7, "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The role ID", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#ROLE_ID" },
+    "CamelKeycloakRoleName": { "index": 8, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The role name", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#ROLE_NAME" },
+    "CamelKeycloakRoleDescription": { "index": 9, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The role description", "constantName": 
"org.apache.camel.component.keycloak.KeycloakConstants#ROLE_DESCRIPTION" }
+  },
+  "properties": {
+    "label": { "index": 0, "kind": "path", "displayName": "Label", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Logical name" },
+    "clientId": { "index": 1, "kind": "parameter", "displayName": "Client Id", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak client ID" },
+    "clientSecret": { "index": 2, "kind": "parameter", "displayName": "Client 
Secret", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak client secret" 
},
+    "keycloakClient": { "index": 3, "kind": "parameter", "displayName": 
"Keycloak Client", "group": "producer", "label": "", "required": false, "type": 
"object", "javaType": "org.keycloak.admin.client.Keycloak", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "To use an existing 
configured Keycloak admin client" },
+    "operation": { "index": 4, "kind": "parameter", "displayName": 
"Operation", "group": "producer", "label": "", "required": false, "type": 
"enum", "javaType": "org.apache.camel.component.keycloak.KeycloakOperations", 
"enum": [ "createRealm", "deleteRealm", "getRealm", "updateRealm", 
"createUser", "deleteUser", "getUser", "updateUser", "listUsers", "createRole", 
"deleteRole", "getRole", "updateRole", "listRoles", "assignRoleToUser", 
"removeRoleFromUser" ], "deprecated": false, "autowire [...]
+    "password": { "index": 5, "kind": "parameter", "displayName": "Password", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak password" },
+    "pojoRequest": { "index": 6, "kind": "parameter", "displayName": "Pojo 
Request", "group": "producer", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "If we want to use a POJO 
request as body or not" },
+    "realm": { "index": 7, "kind": "parameter", "displayName": "Realm", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak realm" },
+    "serverUrl": { "index": 8, "kind": "parameter", "displayName": "Server 
Url", "group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak server URL" },
+    "username": { "index": 9, "kind": "parameter", "displayName": "Username", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.keycloak.KeycloakConfiguration", 
"configurationField": "configuration", "description": "Keycloak username" },
+    "lazyStartProducer": { "index": 10, "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-starter/camel-keycloak-starter/src/main/docs/keycloak.json 
b/components-starter/camel-keycloak-starter/src/main/docs/keycloak.json
new file mode 100644
index 00000000000..e44975f984d
--- /dev/null
+++ b/components-starter/camel-keycloak-starter/src/main/docs/keycloak.json
@@ -0,0 +1,107 @@
+{
+  "groups": [
+    {
+      "name": "camel.component.keycloak",
+      "type": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.customizer",
+      "type": 
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration",
+      "sourceMethod": "getCustomizer()"
+    }
+  ],
+  "properties": [
+    {
+      "name": "camel.component.keycloak.autowired-enabled",
+      "type": "java.lang.Boolean",
+      "description": "Whether autowiring is enabled. This is used for 
automatic autowiring options (the option must be marked as autowired) by 
looking up in the registry to find if there is a single instance of matching 
type, which then gets configured on the component. This can be used for 
automatic configuring JDBC data sources, JMS connection factories, AWS Clients, 
etc.",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration",
+      "defaultValue": true
+    },
+    {
+      "name": "camel.component.keycloak.client-id",
+      "type": "java.lang.String",
+      "description": "Keycloak client ID",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.client-secret",
+      "type": "java.lang.String",
+      "description": "Keycloak client secret",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.configuration",
+      "type": "org.apache.camel.component.keycloak.KeycloakConfiguration",
+      "description": "Component configuration. The option is a 
org.apache.camel.component.keycloak.KeycloakConfiguration type.",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.customizer.enabled",
+      "type": "java.lang.Boolean",
+      "sourceType": 
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
+    },
+    {
+      "name": "camel.component.keycloak.enabled",
+      "type": "java.lang.Boolean",
+      "description": "Whether to enable auto configuration of the keycloak 
component. This is enabled by default.",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.keycloak-client",
+      "type": "org.keycloak.admin.client.Keycloak",
+      "description": "To use an existing configured Keycloak admin client. The 
option is a org.keycloak.admin.client.Keycloak type.",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.lazy-start-producer",
+      "type": "java.lang.Boolean",
+      "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 producer may otherwise fail during 
starting and cause the route to fail being started. By deferring this startup 
to be lazy then the startup failure can be handled during routing messages via 
Camel's routing error handlers. Beware that when the first message is processed 
then creating and starting the [...]
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration",
+      "defaultValue": false
+    },
+    {
+      "name": "camel.component.keycloak.operation",
+      "type": "org.apache.camel.component.keycloak.KeycloakOperations",
+      "description": "The operation to perform",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.password",
+      "type": "java.lang.String",
+      "description": "Keycloak password",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.pojo-request",
+      "type": "java.lang.Boolean",
+      "description": "If we want to use a POJO request as body or not",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration",
+      "defaultValue": false
+    },
+    {
+      "name": "camel.component.keycloak.realm",
+      "type": "java.lang.String",
+      "description": "Keycloak realm",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.server-url",
+      "type": "java.lang.String",
+      "description": "Keycloak server URL",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    },
+    {
+      "name": "camel.component.keycloak.username",
+      "type": "java.lang.String",
+      "description": "Keycloak username",
+      "sourceType": 
"org.apache.camel.component.keycloak.springboot.KeycloakComponentConfiguration"
+    }
+  ],
+  "hints": [],
+  "ignored": {
+    "properties": []
+  }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentAutoConfiguration.java
 
b/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentAutoConfiguration.java
new file mode 100644
index 00000000000..d51f8f968e0
--- /dev/null
+++ 
b/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentAutoConfiguration.java
@@ -0,0 +1,77 @@
+/*
+ * 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.keycloak.springboot;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.component.keycloak.KeycloakComponent;
+import org.apache.camel.spi.ComponentCustomizer;
+import org.apache.camel.spring.boot.CamelAutoConfiguration;
+import org.apache.camel.spring.boot.ComponentConfigurationProperties;
+import org.apache.camel.spring.boot.util.CamelPropertiesHelper;
+import 
org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
+import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
+import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration(proxyBeanMethods = false)
+@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
+@EnableConfigurationProperties({ComponentConfigurationProperties.class,KeycloakComponentConfiguration.class})
+@ConditionalOnHierarchicalProperties({"camel.component", 
"camel.component.keycloak"})
+@AutoConfigureAfter({CamelAutoConfiguration.class, 
KeycloakComponentConverter.class})
+public class KeycloakComponentAutoConfiguration {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+    private final CamelContext camelContext;
+    @Autowired
+    private KeycloakComponentConfiguration configuration;
+
+    public KeycloakComponentAutoConfiguration(
+            org.apache.camel.CamelContext camelContext) {
+        this.camelContext = camelContext;
+    }
+
+    @Lazy
+    @Bean
+    public ComponentCustomizer configureKeycloakComponent() {
+        return new ComponentCustomizer() {
+            @Override
+            public void configure(String name, Component target) {
+                CamelPropertiesHelper.copyProperties(camelContext, 
configuration, target);
+            }
+            @Override
+            public boolean isEnabled(String name, Component target) {
+                return HierarchicalPropertiesEvaluator.evaluate(
+                        applicationContext,
+                        "camel.component.customizer",
+                        "camel.component.keycloak.customizer")
+                    && target instanceof KeycloakComponent;
+            }
+        };
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentConfiguration.java
 
b/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentConfiguration.java
new file mode 100644
index 00000000000..b1cf2d01cf3
--- /dev/null
+++ 
b/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentConfiguration.java
@@ -0,0 +1,198 @@
+/*
+ * 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.keycloak.springboot;
+
+import org.apache.camel.component.keycloak.KeycloakConfiguration;
+import org.apache.camel.component.keycloak.KeycloakOperations;
+import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
+import org.keycloak.admin.client.Keycloak;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * Manage Keycloak instances via Admin API.
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.component.keycloak")
+public class KeycloakComponentConfiguration
+        extends
+            ComponentConfigurationPropertiesCommon {
+
+    /**
+     * Whether to enable auto configuration of the keycloak component. This is
+     * enabled by default.
+     */
+    private Boolean enabled;
+    /**
+     * Keycloak client ID
+     */
+    private String clientId;
+    /**
+     * Keycloak client secret
+     */
+    private String clientSecret;
+    /**
+     * Component configuration. The option is a
+     * org.apache.camel.component.keycloak.KeycloakConfiguration type.
+     */
+    private KeycloakConfiguration configuration;
+    /**
+     * To use an existing configured Keycloak admin client. The option is a
+     * org.keycloak.admin.client.Keycloak type.
+     */
+    private Keycloak keycloakClient;
+    /**
+     * 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 producer may otherwise fail during 
starting
+     * and cause the route to fail being started. By deferring this startup to
+     * be lazy then the startup failure can be handled during routing messages
+     * via Camel's routing error handlers. Beware that when the first message 
is
+     * processed then creating and starting the producer may take a little time
+     * and prolong the total processing time of the processing.
+     */
+    private Boolean lazyStartProducer = false;
+    /**
+     * The operation to perform
+     */
+    private KeycloakOperations operation;
+    /**
+     * Keycloak password
+     */
+    private String password;
+    /**
+     * If we want to use a POJO request as body or not
+     */
+    private Boolean pojoRequest = false;
+    /**
+     * Keycloak realm
+     */
+    private String realm;
+    /**
+     * Keycloak server URL
+     */
+    private String serverUrl;
+    /**
+     * Keycloak username
+     */
+    private String username;
+    /**
+     * Whether autowiring is enabled. This is used for automatic autowiring
+     * options (the option must be marked as autowired) by looking up in the
+     * registry to find if there is a single instance of matching type, which
+     * then gets configured on the component. This can be used for automatic
+     * configuring JDBC data sources, JMS connection factories, AWS Clients,
+     * etc.
+     */
+    private Boolean autowiredEnabled = true;
+
+    public String getClientId() {
+        return clientId;
+    }
+
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    public String getClientSecret() {
+        return clientSecret;
+    }
+
+    public void setClientSecret(String clientSecret) {
+        this.clientSecret = clientSecret;
+    }
+
+    public KeycloakConfiguration getConfiguration() {
+        return configuration;
+    }
+
+    public void setConfiguration(KeycloakConfiguration configuration) {
+        this.configuration = configuration;
+    }
+
+    public Keycloak getKeycloakClient() {
+        return keycloakClient;
+    }
+
+    public void setKeycloakClient(Keycloak keycloakClient) {
+        this.keycloakClient = keycloakClient;
+    }
+
+    public Boolean getLazyStartProducer() {
+        return lazyStartProducer;
+    }
+
+    public void setLazyStartProducer(Boolean lazyStartProducer) {
+        this.lazyStartProducer = lazyStartProducer;
+    }
+
+    public KeycloakOperations getOperation() {
+        return operation;
+    }
+
+    public void setOperation(KeycloakOperations operation) {
+        this.operation = operation;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public Boolean getPojoRequest() {
+        return pojoRequest;
+    }
+
+    public void setPojoRequest(Boolean pojoRequest) {
+        this.pojoRequest = pojoRequest;
+    }
+
+    public String getRealm() {
+        return realm;
+    }
+
+    public void setRealm(String realm) {
+        this.realm = realm;
+    }
+
+    public String getServerUrl() {
+        return serverUrl;
+    }
+
+    public void setServerUrl(String serverUrl) {
+        this.serverUrl = serverUrl;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public Boolean getAutowiredEnabled() {
+        return autowiredEnabled;
+    }
+
+    public void setAutowiredEnabled(Boolean autowiredEnabled) {
+        this.autowiredEnabled = autowiredEnabled;
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentConverter.java
 
b/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentConverter.java
new file mode 100644
index 00000000000..548498c4b4d
--- /dev/null
+++ 
b/components-starter/camel-keycloak-starter/src/main/java/org/apache/camel/component/keycloak/springboot/KeycloakComponentConverter.java
@@ -0,0 +1,65 @@
+/*
+ * 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.keycloak.springboot;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+import org.springframework.beans.factory.annotation.Autowired;
+import 
org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.TypeDescriptor;
+import org.springframework.core.convert.converter.GenericConverter;
+import org.springframework.stereotype.Component;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration(proxyBeanMethods = false)
+@ConfigurationPropertiesBinding
+@Component
+public class KeycloakComponentConverter implements GenericConverter {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    public Set<ConvertiblePair> getConvertibleTypes() {
+        Set<ConvertiblePair> answer = new LinkedHashSet<>();
+        answer.add(new ConvertiblePair(String.class, 
org.apache.camel.component.keycloak.KeycloakConfiguration.class));
+        answer.add(new ConvertiblePair(String.class, 
org.keycloak.admin.client.Keycloak.class));
+        return answer;
+    }
+
+    public Object convert(
+            Object source,
+            TypeDescriptor sourceType,
+            TypeDescriptor targetType) {
+        if (source == null) {
+            return null;
+        }
+        String ref = source.toString();
+        if (!ref.startsWith("#")) {
+            return null;
+        }
+        ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
+        switch (targetType.getName()) {
+            case "org.apache.camel.component.keycloak.KeycloakConfiguration": 
return applicationContext.getBean(ref, 
org.apache.camel.component.keycloak.KeycloakConfiguration.class);
+            case "org.keycloak.admin.client.Keycloak": return 
applicationContext.getBean(ref, org.keycloak.admin.client.Keycloak.class);
+        }
+        return null;
+    }
+}
\ No newline at end of file
diff --git 
a/components-starter/camel-keycloak-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
 
b/components-starter/camel-keycloak-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 00000000000..68837f622de
--- /dev/null
+++ 
b/components-starter/camel-keycloak-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+org.apache.camel.component.keycloak.springboot.KeycloakComponentConverter
+org.apache.camel.component.keycloak.springboot.KeycloakComponentAutoConfiguration


Reply via email to