diff --git a/maxkey-authentications/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java b/maxkey-authentications/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java index 1ed1866b1..7a4f67eef 100644 --- a/maxkey-authentications/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java +++ b/maxkey-authentications/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java @@ -69,7 +69,9 @@ public class SocialSignOnProviderService{ authRequest = new AuthLinkedinRequest(authConfig); }else if(provider.equalsIgnoreCase("DingTalk")) { authRequest = new AuthDingTalkRequest(authConfig); - } + }else if(provider.equalsIgnoreCase("gitee")) { + authRequest = new AuthGiteeRequest(authConfig); + } diff --git a/maxkey-web-maxkey/src/main/resources/maxkey.properties b/maxkey-web-maxkey/src/main/resources/maxkey.properties index 583b2e3b4..713fba141 100644 --- a/maxkey-web-maxkey/src/main/resources/maxkey.properties +++ b/maxkey-web-maxkey/src/main/resources/maxkey.properties @@ -28,7 +28,7 @@ config.login.mfa.type=TimeBasedOtpAuthn #enable social sign on config.login.socialsignon=true #social sign on providers -config.login.socialsignon.providers=sinaweibo,google,qq,dingtalk,microsoft,facebook +config.login.socialsignon.providers=gitee,wechat,sinaweibo,google,qq,dingtalk,microsoft,facebook #Enable kerberos/SPNEGO config.login.kerberos=true #wsFederation @@ -163,6 +163,23 @@ config.saml.v20.metadata.telephoneNumber=4008981111 ############################################################################ ############################################################################ +#gitee +config.socialsignon.gitee.provider=gitee +config.socialsignon.gitee.provider.name=Gitee +config.socialsignon.gitee.icon=images/social/gitee.png +config.socialsignon.gitee.client.id=ee6fdc484b3398d17e77d6ff37fd8b9fe502106398c7b22bf5522d3c01303f45 +config.socialsignon.gitee.client.secret=d6c3558f295f044df538c966a9084166f9a877c7a7392543184007a5faccdbad +config.socialsignon.gitee.account.id=id +config.socialsignon.gitee.sortorder=1 +#wechat +config.socialsignon.wechatopen.provider=wechatopen +config.socialsignon.wechatopen.provider.name=\u5fae\u4fe1 +config.socialsignon.wechatopen.icon=images/social/wechat.png +config.socialsignon.wechatopen.client.id=ee6fdc484b3398d17e7 +config.socialsignon.wechatopen.client.secret=7a5faccdbad +config.socialsignon.wechatopen.account.id=id +config.socialsignon.wechatopen.sortorder=2 + #sina weibo config.socialsignon.sinaweibo.provider=sinaweibo config.socialsignon.sinaweibo.provider.name=\u65b0\u6d6a\u5fae\u535a @@ -170,7 +187,7 @@ config.socialsignon.sinaweibo.icon=images/social/weibo.png config.socialsignon.sinaweibo.client.id=3379757634 config.socialsignon.sinaweibo.client.secret=1adfdf9800299037bcab9d1c238664ba config.socialsignon.sinaweibo.account.id=id -config.socialsignon.sinaweibo.sortorder=1 +config.socialsignon.sinaweibo.sortorder=3 #Google config.socialsignon.google.provider=google @@ -179,16 +196,7 @@ config.socialsignon.google.icon=images/social/google.png config.socialsignon.google.client.id=519914515488.apps.googleusercontent.com config.socialsignon.google.client.secret=3aTW3Iw7e11QqMnHxciCaXTt config.socialsignon.google.account.id=id -config.socialsignon.google.sortorder=2 - -#QQ -config.socialsignon.qq.provider=qq -config.socialsignon.qq.provider.name=QQ -config.socialsignon.qq.icon=images/social/qq.png -config.socialsignon.qq.client.id=101225363 -config.socialsignon.qq.client.secret=8577d75e0eb4a91ac549cc8be3371bfd -config.socialsignon.qq.account.id=openid -config.socialsignon.qq.sortorder=4 +config.socialsignon.google.sortorder=4 #dingtalk config.socialsignon.dingtalk.provider=dingtalk @@ -199,6 +207,17 @@ config.socialsignon.dingtalk.client.secret=Crm7YJbMKfRlvG2i1SHpg4GHVpqF_oXiEjhmR config.socialsignon.dingtalk.account.id=openid config.socialsignon.dingtalk.sortorder=5 +#QQ +config.socialsignon.qq.provider=qq +config.socialsignon.qq.provider.name=QQ +config.socialsignon.qq.icon=images/social/qq.png +config.socialsignon.qq.client.id=101225363 +config.socialsignon.qq.client.secret=8577d75e0eb4a91ac549cc8be3371bfd +config.socialsignon.qq.account.id=openid +config.socialsignon.qq.sortorder=6 + + + #Microsoft config.socialsignon.microsoft.provider=microsoft config.socialsignon.microsoft.provider.name=Microsoft @@ -206,7 +225,7 @@ config.socialsignon.microsoft.icon=images/social/microsoft.png config.socialsignon.microsoft.client.id=24aa73b6-7928-4e64-bd64-d8682e650f95 config.socialsignon.microsoft.client.secret=PF[_AthtjVrtWVO2mNy@CJxY1@Z8FNf5 config.socialsignon.microsoft.account.id=id -config.socialsignon.microsoft.sortorder=6 +config.socialsignon.microsoft.sortorder=7 #facebook config.socialsignon.facebook.provider=facebook @@ -215,4 +234,4 @@ config.socialsignon.facebook.icon=images/social/facebook.png config.socialsignon.facebook.client.id=appKey config.socialsignon.facebook.client.secret=appSecret config.socialsignon.facebook.account.id=id -config.socialsignon.facebook.sortorder=7 +config.socialsignon.facebook.sortorder=8 diff --git a/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl b/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl index 44ee9d8e9..abfe189a9 100644 --- a/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl +++ b/maxkey-web-maxkey/src/main/resources/templates/views/login.ftl @@ -364,7 +364,7 @@ <#list ssopList as ssop> - <#if (ssop_index)%3==0> + <#if (ssop_index)%4==0> @@ -372,11 +372,11 @@    - <#if (ssop_index +1)%3==0> + <#if (ssop_index +1)%4==0> - <#if (ssopList?size)%3!=0> + <#if (ssopList?size)%4!=0>