SbloodyS commented on code in PR #17340:
URL:
https://github.com/apache/dolphinscheduler/pull/17340#discussion_r2296920289
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java:
##########
@@ -263,4 +303,90 @@ public void loginByAuth2(@RequestParam String code,
@RequestParam String provide
"oauth2", "oauth2 auth error"));
}
}
+
+ /**
+ * Handle OIDC callback
+ *
+ * @param code authorization code
+ * @param state state parameter
+ * @param response HTTP response
+ */
+ @SneakyThrows
+ @Operation(summary = "handleOidcCallback", description =
"HANDLE_OIDC_CALLBACK")
+ @GetMapping("login/oauth2/code/{providerId}")
Review Comment:
```suggestion
@GetMapping("/login/oauth2/code/{providerId}")
```
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/LoginController.java:
##########
@@ -207,6 +222,31 @@ public
Result<List<OAuth2Configuration.OAuth2ClientProperties>> oauth2Provider()
return Result.success(providers);
}
+ /**
+ * Get OIDC providers
+ * @return list of OIDC providers
+ */
+ @Operation(summary = "getOidcProviders", description =
"GET_OIDC_PROVIDERS")
+ @GetMapping("oidc-providers")
Review Comment:
```suggestion
@GetMapping("/oidc-providers")
```
##########
dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/resources/docker/oidc-login/docker-compose.yaml:
##########
@@ -0,0 +1,110 @@
+#
+# 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.
+#
+
+version: '3.8'
+
+services:
+ dolphinscheduler:
+ image: apache/dolphinscheduler-standalone-server:oidc-dev
+ platform: linux/arm64
+ ports:
+ - "12345:12345"
+ environment:
+ - TZ=Asia/Shanghai
+ - SPRING_PROFILES_ACTIVE=mysql
Review Comment:
I think we don't need `mysql` since standalone server would use `h2` by
default. The usage of mysql and h2 is basically the same. And we don't need
init database sql file too.
##########
dolphinscheduler-ui/src/views/login/index.module.scss:
##########
@@ -59,4 +59,41 @@
margin-bottom: 30px;
}
}
+}
+
+.oidc-provider-link {
+ text-decoration: none;
+ width: 100%;
+ display: block;
+ margin-bottom: 12px;
+}
+
+.oidc-provider-btn {
+ font-weight: 350 !important;
+ color: #24292e !important;
+
+ background-color: #f6f8fa;
+ border-radius: 6px;
+ height: 40px;
+
+ transition: all 0.2s ease-in-out;
+
+ &:hover {
+ transform: translate(1px, -1px);
+ box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.08);
+ }
+}
+
+.oidc-btn-content {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+}
+
+.oidc-btn-icon {
+ width: 20px;
+ height: 20px;
+ margin-right: 8px;
+ object-fit: contain;
}
Review Comment:
Please leave an blank line at the bottom of each file.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]