You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "tdiesler (via GitHub)" <gi...@apache.org> on 2025/03/14 15:22:42 UTC
[PR] CAMEL-21867: Add OAuth support for runtime=spring-boot [camel]
tdiesler opened a new pull request, #17460:
URL: https://github.com/apache/camel/pull/17460
https://issues.apache.org/jira/browse/CAMEL-21867
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-21867: Add OAuth support for runtime=spring-boot [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #17460:
URL: https://github.com/apache/camel/pull/17460#discussion_r1996052953
##########
components/camel-oauth/pom.xml:
##########
@@ -39,25 +39,17 @@
<dependencies>
<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt}</version>
</dependency>
-
- <!-- https://vertx.io/docs/vertx-auth-oauth2/java/ -->
- <dependency>
- <groupId>io.vertx</groupId>
- <artifactId>vertx-auth-oauth2</artifactId>
- <version>${vertx-version}</version>
- </dependency>
-
<dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
+ <groupId>org.apache.camel</groupId>
Review Comment:
Can this be camel-support instead of camel-core
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-21867: Add OAuth support for runtime=spring-boot [camel]
Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd merged PR #17460:
URL: https://github.com/apache/camel/pull/17460
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-21867: Add OAuth support for runtime=spring-boot [camel]
Posted by "PascalSchumacher (via GitHub)" <gi...@apache.org>.
PascalSchumacher commented on code in PR #17460:
URL: https://github.com/apache/camel/pull/17460#discussion_r1997640777
##########
components/camel-oauth/src/main/java/org/apache/camel/oauth/JWTOptions.java:
##########
@@ -0,0 +1,171 @@
+/*
+ * 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.oauth;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.vertx.core.json.JsonObject;
+
+public class JWTOptions {
+ private int leeway = 0;
+ private boolean ignoreExpiration;
+ private String algorithm = "HS256";
+ private JsonObject header;
+ private boolean noTimestamp;
+ private int expires;
+ private List<String> audience;
+ private String issuer;
+ private String subject;
+ private List<String> permissions;
+ private String nonceAlgorithm;
+
+ public JWTOptions() {
+ this.header = new JsonObject();
+ }
+
+ public JWTOptions(JWTOptions other) {
+ this.leeway = other.leeway;
+ this.ignoreExpiration = other.ignoreExpiration;
+ this.algorithm = other.algorithm;
+ this.header = other.header == null ? new JsonObject() : other.header.copy();
+ this.noTimestamp = other.noTimestamp;
+ this.expires = other.expires;
+ this.audience = other.audience == null ? null : new ArrayList<>(other.audience);
+ this.issuer = other.issuer;
+ this.subject = other.subject;
+ this.permissions = other.permissions == null ? null : new ArrayList<>(other.permissions);
+ this.nonceAlgorithm = other.nonceAlgorithm;
+ }
+
+ /*
+ public JWTOptions(JsonObject json) {
+ this.header = new JsonObject();
+ JWTOptionsConverter.fromJson(json, this);
+ }
+
+ public JsonObject toJson() {
+ JsonObject json = new JsonObject();
+ JWTOptionsConverter.toJson(this, json);
+ return json;
+ }
+ */
Review Comment:
I guess this commented-out code could/should be removed?
##########
components/camel-oauth/src/main/java/org/apache/camel/oauth/JWTOptions.java:
##########
@@ -0,0 +1,171 @@
+/*
+ * 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.oauth;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.vertx.core.json.JsonObject;
+
+public class JWTOptions {
+ private int leeway = 0;
+ private boolean ignoreExpiration;
+ private String algorithm = "HS256";
+ private JsonObject header;
+ private boolean noTimestamp;
+ private int expires;
+ private List<String> audience;
+ private String issuer;
+ private String subject;
+ private List<String> permissions;
+ private String nonceAlgorithm;
+
+ public JWTOptions() {
+ this.header = new JsonObject();
+ }
+
+ public JWTOptions(JWTOptions other) {
+ this.leeway = other.leeway;
+ this.ignoreExpiration = other.ignoreExpiration;
+ this.algorithm = other.algorithm;
+ this.header = other.header == null ? new JsonObject() : other.header.copy();
+ this.noTimestamp = other.noTimestamp;
+ this.expires = other.expires;
+ this.audience = other.audience == null ? null : new ArrayList<>(other.audience);
+ this.issuer = other.issuer;
+ this.subject = other.subject;
+ this.permissions = other.permissions == null ? null : new ArrayList<>(other.permissions);
+ this.nonceAlgorithm = other.nonceAlgorithm;
+ }
+
+ /*
+ public JWTOptions(JsonObject json) {
+ this.header = new JsonObject();
+ JWTOptionsConverter.fromJson(json, this);
+ }
+
+ public JsonObject toJson() {
+ JsonObject json = new JsonObject();
+ JWTOptionsConverter.toJson(this, json);
+ return json;
+ }
+ */
Review Comment:
I guess this commented-out code should be removed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-21867: Add OAuth support for runtime=spring-boot [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17460:
URL: https://github.com/apache/camel/pull/17460#issuecomment-2725021217
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
* You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
* :warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org