From 18e919bde3d925ee76fe29c7a6621c2716b1e4e4 Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期五, 21 三月 2025 09:43:31 +0800 Subject: [PATCH] feat(social): 添加 Keycloak社交登录支持 --- ruoyi-admin/src/main/resources/application-dev.yml | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index b634908..fb3a3db 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -8,8 +8,8 @@ metadata: username: ${spring.boot.admin.client.username} userpassword: ${spring.boot.admin.client.password} - username: ruoyi - password: 123456 + username: @monitor.username@ + password: @monitor.password@ --- # snail-job 閰嶇疆 snail-job: @@ -25,6 +25,10 @@ namespace: ${spring.profiles.active} # 闅忎富搴旂敤绔彛椋橀�� port: 2${server.port} + # 瀹㈡埛绔痠p鎸囧畾 + host: + # RPC绫诲瀷: netty, grpc + rpc-type: grpc --- # 鏁版嵁婧愰厤缃� spring: @@ -45,17 +49,17 @@ driverClassName: com.mysql.cj.jdbc.Driver # jdbc 鎵�鏈夊弬鏁伴厤缃弬鑰� https://lionli.blog.csdn.net/article/details/122018562 # rewriteBatchedStatements=true 鎵瑰鐞嗕紭鍖� 澶у箙鎻愬崌鎵归噺鎻掑叆鏇存柊鍒犻櫎鎬ц兘(瀵规暟鎹簱鏈夋�ц兘鎹熻�� 浣跨敤鎵归噺鎿嶄綔搴旇�冭檻鎬ц兘闂) - url: jdbc:mysql://192.168.12.240:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root password: 123456 # 浠庡簱鏁版嵁婧� - slave: - lazy: true - type: ${spring.datasource.type} - driverClassName: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true - username: - password: +# slave: +# lazy: true +# type: ${spring.datasource.type} +# driverClassName: com.mysql.cj.jdbc.Driver +# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true +# username: +# password: # oracle: # type: ${spring.datasource.type} # driverClassName: oracle.jdbc.OracleDriver @@ -189,6 +193,14 @@ # 鍓嶇澶栫綉璁块棶鍦板潃 address: http://localhost:80 type: + keycloak: + # keycloak 鏈嶅姟鍣ㄥ湴鍧� + server-url: https://lanbaosystem.shlanbao.cn:8443 + realm: lanbao + client-id: DataCapture + client-secret: kplisa4lJHEIM6knqefVbxln85QbA5NX + redirect-uri: ${justauth.address}/social-callback + scopes: [openid, email, phone, profile] maxkey: # maxkey 鏈嶅姟鍣ㄥ湴鍧� # 娉ㄦ剰 濡備笅鍧囬厤缃潎涓嶉渶瑕佷慨鏀� maxkey 宸茬粡鍐呯疆濂戒簡鏁版嵁 @@ -198,7 +210,7 @@ redirect-uri: ${justauth.address}/social-callback?source=maxkey topiam: # topiam 鏈嶅姟鍣ㄥ湴鍧� - server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol + server-url: http://127.0.0.1:1898/api/v1/authorize/y0q************spq***********8ol client-id: 449c4*********937************759 client-secret: ac7***********1e0************28d redirect-uri: ${justauth.address}/social-callback?source=topiam -- Gitblit v1.9.3