Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
4d3f1245
MaxKey
项目概览
yujianwangzivayy
/
MaxKey
与 Fork 源项目一致
Fork自
MaxKey单点登录官方(MaxKeyTop) / MaxKey
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4d3f1245
编写于
10月 15, 2021
作者:
MaxKey单点登录官方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SocialsProvider to database
上级
28a0fb9d
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
1073 addition
and
291 deletion
+1073
-291
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/AbstractSocialSignOnEndpoint.java
...hn/support/socialsignon/AbstractSocialSignOnEndpoint.java
+33
-16
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/SocialSignOnEndpoint.java
...xkey/authn/support/socialsignon/SocialSignOnEndpoint.java
+13
-5
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java
...ort/socialsignon/service/SocialSignOnProviderService.java
+93
-40
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/autoconfigure/SocialSignOnAutoConfiguration.java
...g/maxkey/autoconfigure/SocialSignOnAutoConfiguration.java
+6
-42
maxkey-core/src/main/java/org/maxkey/entity/SocialsProvider.java
...core/src/main/java/org/maxkey/entity/SocialsProvider.java
+313
-0
maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/SocialsProviderMapper.java
.../org/maxkey/persistence/mapper/SocialsProviderMapper.java
+31
-0
maxkey-persistence/src/main/java/org/maxkey/persistence/service/SocialsProviderService.java
...rg/maxkey/persistence/service/SocialsProviderService.java
+45
-0
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/SocialsProviderMapper.xml
...ey/persistence/mapper/xml/mysql/SocialsProviderMapper.xml
+28
-0
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/binding/impl/ExtractPostBindingAdapter.java
.../authz/saml20/binding/impl/ExtractPostBindingAdapter.java
+5
-3
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/xml/AssertionGenerator.java
.../maxkey/authz/saml20/provider/xml/AssertionGenerator.java
+4
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SocialSignOnListController.java
...org/maxkey/web/contorller/SocialSignOnListController.java
+5
-5
maxkey-webs/maxkey-web-maxkey/src/main/resources/application-http.properties
...web-maxkey/src/main/resources/application-http.properties
+0
-89
maxkey-webs/maxkey-web-maxkey/src/main/resources/application-https.properties
...eb-maxkey/src/main/resources/application-https.properties
+0
-89
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/MaxKeyMgtMvcConfig.java
...-web-mgt/src/main/java/org/maxkey/MaxKeyMgtMvcConfig.java
+2
-0
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/SocialsProviderController.java
.../org/maxkey/web/contorller/SocialsProviderController.java
+137
-0
maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message.properties
...ey-web-mgt/src/main/resources/messages/message.properties
+11
-0
maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_en.properties
...web-mgt/src/main/resources/messages/message_en.properties
+11
-0
maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_zh_CN.properties
...-mgt/src/main/resources/messages/message_zh_CN.properties
+11
-0
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/layout/sidenav.ftl
...mgt/src/main/resources/templates/views/layout/sidenav.ftl
+7
-1
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderAdd.ftl
...es/templates/views/socialsprovider/socialsProviderAdd.ftl
+92
-0
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderList.ftl
...s/templates/views/socialsprovider/socialsProviderList.ftl
+131
-0
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderUpdate.ftl
...templates/views/socialsprovider/socialsProviderUpdate.ftl
+95
-0
未找到文件。
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/AbstractSocialSignOnEndpoint.java
浏览文件 @
4d3f1245
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
package
org.maxkey.authn.support.socialsignon
;
package
org.maxkey.authn.support.socialsignon
;
import
org.maxkey.authn.AbstractAuthenticationProvider
;
import
org.maxkey.authn.AbstractAuthenticationProvider
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProvider
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociateService
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociateService
;
import
org.maxkey.configuration.ApplicationConfig
;
import
org.maxkey.configuration.ApplicationConfig
;
import
org.maxkey.entity.SocialsProvider
;
import
org.maxkey.web.WebContext
;
import
org.maxkey.web.WebContext
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -59,7 +59,7 @@ public class AbstractSocialSignOnEndpoint {
...
@@ -59,7 +59,7 @@ public class AbstractSocialSignOnEndpoint {
}
}
protected
Social
SignOn
Provider
socialSignOnProvider
;
protected
Social
s
Provider
socialSignOnProvider
;
protected
AuthRequest
authRequest
;
protected
AuthRequest
authRequest
;
...
@@ -84,7 +84,7 @@ public class AbstractSocialSignOnEndpoint {
...
@@ -84,7 +84,7 @@ public class AbstractSocialSignOnEndpoint {
protected
AuthRequest
buildAuthRequest
(
String
provider
){
protected
AuthRequest
buildAuthRequest
(
String
provider
){
try
{
try
{
Social
SignOn
Provider
socialSignOnProvider
=
socialSignOnProviderService
.
get
(
provider
);
Social
s
Provider
socialSignOnProvider
=
socialSignOnProviderService
.
get
(
provider
);
_logger
.
debug
(
"socialSignOn Provider : "
+
socialSignOnProvider
);
_logger
.
debug
(
"socialSignOn Provider : "
+
socialSignOnProvider
);
if
(
socialSignOnProvider
!=
null
){
if
(
socialSignOnProvider
!=
null
){
...
@@ -100,26 +100,43 @@ public class AbstractSocialSignOnEndpoint {
...
@@ -100,26 +100,43 @@ public class AbstractSocialSignOnEndpoint {
}
}
protected
String
authCallback
()
throws
Exception
{
protected
String
authCallback
()
throws
Exception
{
AuthCallback
authCallback
=
new
AuthCallback
();
authCallback
.
setCode
(
WebContext
.
getRequest
().
getParameter
(
"code"
));
authCallback
.
setAuth_code
(
WebContext
.
getRequest
().
getParameter
(
"auth_code"
));
authCallback
.
setOauth_token
(
WebContext
.
getRequest
().
getParameter
(
"oauthToken"
));
authCallback
.
setAuthorization_code
(
WebContext
.
getRequest
().
getParameter
(
"authorization_code"
));
authCallback
.
setOauth_verifier
(
WebContext
.
getRequest
().
getParameter
(
"oauthVerifier"
));
authCallback
.
setState
(
WebContext
.
getRequest
().
getParameter
(
"state"
));
_logger
.
debug
(
"Callback OAuth code {}, auth_code {}, oauthToken {}, authorization_code {}, oauthVerifier {}"
,
authCallback
.
getCode
(),
authCallback
.
getAuth_code
(),
authCallback
.
getOauth_token
(),
authCallback
.
getAuthorization_code
(),
authCallback
.
getOauth_verifier
());
_logger
.
debug
(
"Callback state {} "
,
authCallback
.
getState
()
);
authRequest
=(
AuthRequest
)
WebContext
.
getAttribute
(
SOCIALSIGNON_OAUTH_SERVICE_SESSION
);
authRequest
=(
AuthRequest
)
WebContext
.
getAttribute
(
SOCIALSIGNON_OAUTH_SERVICE_SESSION
);
socialSignOnProvider
=(
SocialSignOnProvider
)
WebContext
.
getAttribute
(
SOCIALSIGNON_PROVIDER_SESSION
);
socialSignOnProvider
=(
SocialsProvider
)
WebContext
.
getAttribute
(
SOCIALSIGNON_PROVIDER_SESSION
);
//clear session
WebContext
.
removeAttribute
(
SOCIALSIGNON_OAUTH_SERVICE_SESSION
);
WebContext
.
removeAttribute
(
SOCIALSIGNON_OAUTH_SERVICE_SESSION
);
WebContext
.
removeAttribute
(
SOCIALSIGNON_PROVIDER_SESSION
);
WebContext
.
removeAttribute
(
SOCIALSIGNON_PROVIDER_SESSION
);
AuthCallback
authCallback
=
new
AuthCallback
();
if
(
authRequest
==
null
)
{
//if authRequest is null renew one
authCallback
.
setCode
(
WebContext
.
getRequest
().
getParameter
(
"code"
)
);
authRequest
=
socialSignOnProviderService
.
getAuthRequest
(
provider
,
applicationConfig
);
authCallback
.
setAuth_code
(
WebContext
.
getRequest
().
getParameter
(
"auth_code"
));
if
(
authCallback
.
getState
()
!=
null
)
{
authCallback
.
setOauth_token
(
WebContext
.
getRequest
().
getParameter
(
"oauthToken"
));
authRequest
.
authorize
(
authCallback
.
getState
(
));
authCallback
.
setAuthorization_code
(
WebContext
.
getRequest
().
getParameter
(
"authorization_code"
));
}
authCallback
.
setOauth_verifier
(
WebContext
.
getRequest
().
getParameter
(
"oauthVerifier"
)
);
_logger
.
debug
(
"session authRequest is null , renew one"
);
authCallback
.
setState
(
WebContext
.
getRequest
().
getParameter
(
"state"
));
}
AuthResponse
<?>
authResponse
=
authRequest
.
login
(
authCallback
);
AuthResponse
<?>
authResponse
=
authRequest
.
login
(
authCallback
);
_logger
.
debug
(
"Response : "
+
authResponse
);
_logger
.
debug
(
"Response : "
+
authResponse
.
getData
()
);
accountId
=
socialSignOnProviderService
.
getAccountId
(
socialSignOnProvider
.
getProvider
()
,
authResponse
);
accountId
=
socialSignOnProviderService
.
getAccountId
(
provider
,
authResponse
);
_logger
.
debug
(
"getAccountId : "
+
accountId
);
_logger
.
debug
(
"getAccountId : "
+
accountId
);
return
accountId
;
return
accountId
;
}
}
}
}
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/SocialSignOnEndpoint.java
浏览文件 @
4d3f1245
...
@@ -23,9 +23,9 @@ package org.maxkey.authn.support.socialsignon;
...
@@ -23,9 +23,9 @@ package org.maxkey.authn.support.socialsignon;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.maxkey.authn.LoginCredential
;
import
org.maxkey.authn.LoginCredential
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProvider
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociate
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociate
;
import
org.maxkey.constants.ConstantsLoginType
;
import
org.maxkey.constants.ConstantsLoginType
;
import
org.maxkey.entity.SocialsProvider
;
import
org.maxkey.web.WebContext
;
import
org.maxkey.web.WebContext
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -38,6 +38,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -38,6 +38,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
me.zhyd.oauth.request.AuthRequest
;
/**
/**
* @author Crystal.Sea
* @author Crystal.Sea
*
*
...
@@ -103,12 +105,18 @@ public class SocialSignOnEndpoint extends AbstractSocialSignOnEndpoint{
...
@@ -103,12 +105,18 @@ public class SocialSignOnEndpoint extends AbstractSocialSignOnEndpoint{
@RequestMapping
(
value
={
"/scanqrcode/{provider}"
},
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
={
"/scanqrcode/{provider}"
},
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
Social
SignOn
Provider
scanQRCode
(
public
Social
s
Provider
scanQRCode
(
HttpServletRequest
request
,
HttpServletRequest
request
,
@PathVariable
(
"provider"
)
String
provider
)
{
@PathVariable
(
"provider"
)
String
provider
)
{
socialSignOnAuthorize
(
request
,
provider
);
AuthRequest
authRequest
=
buildAuthRequest
(
provider
);
SocialSignOnProvider
socialSignOnProvider
=
socialSignOnProviderService
.
get
(
provider
);
socialSignOnProvider
.
setState
(
request
.
getSession
().
getId
());
if
(
authRequest
==
null
)
{
_logger
.
error
(
"build authRequest fail ."
);
}
String
state
=
request
.
getSession
().
getId
();
authRequest
.
authorize
(
state
);
SocialsProvider
socialSignOnProvider
=
socialSignOnProviderService
.
get
(
provider
);
socialSignOnProvider
.
setState
(
state
);
socialSignOnProvider
.
setRedirectUri
(
applicationConfig
.
getServerPrefix
()+
socialSignOnProvider
.
setRedirectUri
(
applicationConfig
.
getServerPrefix
()+
"/logon/oauth20/callback/"
+
provider
);
"/logon/oauth20/callback/"
+
provider
);
return
socialSignOnProvider
;
return
socialSignOnProvider
;
...
...
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOnProviderService.java
浏览文件 @
4d3f1245
...
@@ -17,30 +17,42 @@
...
@@ -17,30 +17,42 @@
package
org.maxkey.authn.support.socialsignon.service
;
package
org.maxkey.authn.support.socialsignon.service
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
org.maxkey.configuration.ApplicationConfig
;
import
org.maxkey.configuration.ApplicationConfig
;
import
org.maxkey.entity.SocialsProvider
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.jdbc.core.RowMapper
;
import
me.zhyd.oauth.config.AuthConfig
;
import
me.zhyd.oauth.config.AuthConfig
;
import
me.zhyd.oauth.model.AuthResponse
;
import
me.zhyd.oauth.model.AuthResponse
;
import
me.zhyd.oauth.model.AuthUser
;
import
me.zhyd.oauth.model.AuthUser
;
import
me.zhyd.oauth.request.*
;
import
me.zhyd.oauth.request.*
;
public
class
SocialSignOnProviderService
{
public
class
SocialSignOnProviderService
{
private
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
SocialSignOnProviderService
.
class
);
private
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
SocialSignOnProviderService
.
class
);
List
<
SocialSignOnProvider
>
socialSignOnProviders
=
new
ArrayList
<
SocialSignOnProvider
>();
private
static
final
String
DEFAULT_SELECT_STATEMENT
=
"select * from mxk_socials_provider where status = 1 order by sortindex"
;
List
<
SocialsProvider
>
socialSignOnProviders
=
new
ArrayList
<
SocialsProvider
>();
HashMap
<
String
,
SocialsProvider
>
socialSignOnProviderMaps
=
new
HashMap
<
String
,
SocialsProvider
>();
HashMap
<
String
,
SocialSignOnProvider
>
socialSignOnProviderMaps
=
new
HashMap
<
String
,
SocialSignOnProvider
>()
;
private
final
JdbcTemplate
jdbcTemplate
;
public
SocialSignOnProviderService
(
JdbcTemplate
jdbcTemplate
)
{
this
.
jdbcTemplate
=
jdbcTemplate
;
}
public
Social
SignOn
Provider
get
(
String
provider
){
public
Social
s
Provider
get
(
String
provider
){
return
socialSignOnProviderMaps
.
get
(
provider
);
return
socialSignOnProviderMaps
.
get
(
provider
);
}
}
...
@@ -109,44 +121,85 @@ public class SocialSignOnProviderService{
...
@@ -109,44 +121,85 @@ public class SocialSignOnProviderService{
}
}
public
String
getAccountId
(
String
provider
,
AuthResponse
<?>
authResponse
)
throws
Exception
{
public
String
getAccountId
(
String
provider
,
AuthResponse
<?>
authResponse
)
throws
Exception
{
if
(
provider
.
equalsIgnoreCase
(
"WeChatOpen"
))
{
if
(
authResponse
.
getData
()
!=
null
)
{
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
AuthUser
authUser
=
(
AuthUser
)
authResponse
.
getData
();
}
else
if
(
provider
.
equalsIgnoreCase
(
"sinaweibo"
))
{
_logger
.
debug
(
"AuthUser[{},{},{},{},{},{},{},{},{},{},{},{}]"
,
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
authUser
.
getUuid
(),
}
else
if
(
provider
.
equalsIgnoreCase
(
"qq"
))
{
authUser
.
getUsername
(),
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
authUser
.
getNickname
(),
}
else
if
(
provider
.
equalsIgnoreCase
(
"Alipay"
))
{
authUser
.
getGender
(),
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
authUser
.
getEmail
(),
}
else
if
(
provider
.
equalsIgnoreCase
(
"Twitter"
))
{
authUser
.
getCompany
(),
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
authUser
.
getBlog
(),
}
else
if
(
provider
.
equalsIgnoreCase
(
"google"
))
{
authUser
.
getLocation
(),
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
authUser
.
getRemark
(),
}
else
if
(
provider
.
equalsIgnoreCase
(
"microsoft"
))
{
authUser
.
getSource
(),
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
authUser
.
getBlog
(),
}
else
if
(
provider
.
equalsIgnoreCase
(
"Linkedin"
))
{
authUser
.
getAvatar
());
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
_logger
.
debug
(
"RawUserInfo {}"
,
authUser
.
getRawUserInfo
());
}
else
if
(
provider
.
equalsIgnoreCase
(
"DingTalk"
))
{
if
(
provider
.
equalsIgnoreCase
(
"WeChatOpen"
))
{
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
return
authUser
.
getUuid
();
}
else
{
}
else
if
(
provider
.
equalsIgnoreCase
(
"sinaweibo"
))
{
return
((
AuthUser
)
authResponse
.
getData
()).
getUuid
();
return
authUser
.
getUuid
();
}
}
else
if
(
provider
.
equalsIgnoreCase
(
"qq"
))
{
return
authUser
.
getUuid
();
}
else
if
(
provider
.
equalsIgnoreCase
(
"Alipay"
))
{
return
authUser
.
getUuid
();
}
else
if
(
provider
.
equalsIgnoreCase
(
"Twitter"
))
{
return
authUser
.
getUuid
();
}
else
if
(
provider
.
equalsIgnoreCase
(
"google"
))
{
return
authUser
.
getUuid
();
}
else
if
(
provider
.
equalsIgnoreCase
(
"microsoft"
))
{
return
authUser
.
getUuid
();
}
else
if
(
provider
.
equalsIgnoreCase
(
"Linkedin"
))
{
return
authUser
.
getUuid
();
}
else
if
(
provider
.
equalsIgnoreCase
(
"DingTalk"
))
{
return
authUser
.
getUuid
();
}
else
{
return
authUser
.
getUuid
();
}
}
return
null
;
}
}
public
List
<
Social
SignOn
Provider
>
getSocialSignOnProviders
()
{
public
List
<
Social
s
Provider
>
getSocialSignOnProviders
()
{
return
socialSignOnProviders
;
return
socialSignOnProviders
;
}
}
public
void
setSocialSignOnProviders
(
public
void
loadSocialsProviders
()
{
List
<
SocialSignOnProvider
>
socialSignOnProviders
)
{
List
<
SocialsProvider
>
listSocialsProvider
=
jdbcTemplate
.
query
(
DEFAULT_SELECT_STATEMENT
,
for
(
SocialSignOnProvider
socialSignOnProvider
:
socialSignOnProviders
){
new
SocialsProviderRowMapper
());
socialSignOnProviderMaps
.
put
(
socialSignOnProvider
.
getProvider
(),
socialSignOnProvider
);
_logger
.
trace
(
"query SocialsProvider "
+
listSocialsProvider
);
if
(!
socialSignOnProvider
.
isHidden
())
{
for
(
SocialsProvider
socialsProvider
:
listSocialsProvider
){
this
.
socialSignOnProviders
.
add
(
socialSignOnProvider
);
socialSignOnProviderMaps
.
put
(
socialsProvider
.
getProvider
(),
socialsProvider
);
}
_logger
.
debug
(
"Social Provider "
+
socialsProvider
.
getProvider
()
}
+
"("
+
socialsProvider
.
getProviderName
()+
")"
);
if
(!
socialsProvider
.
getHidden
().
equals
(
"true"
))
{
_logger
.
debug
(
"social SignOn Providers {}"
,
this
.
socialSignOnProviders
);
this
.
socialSignOnProviders
.
add
(
socialsProvider
);
}
}
_logger
.
debug
(
"social SignOn Providers {}"
,
this
.
socialSignOnProviders
);
}
}
private
final
class
SocialsProviderRowMapper
implements
RowMapper
<
SocialsProvider
>
{
@Override
public
SocialsProvider
mapRow
(
ResultSet
rs
,
int
rowNum
)
throws
SQLException
{
SocialsProvider
socialsProvider
=
new
SocialsProvider
();
socialsProvider
.
setId
(
rs
.
getString
(
"id"
));
socialsProvider
.
setProvider
(
rs
.
getString
(
"provider"
));
socialsProvider
.
setProviderName
(
rs
.
getString
(
"providername"
));
socialsProvider
.
setIcon
(
rs
.
getString
(
"icon"
));
socialsProvider
.
setClientId
(
rs
.
getString
(
"clientid"
));
socialsProvider
.
setClientSecret
(
rs
.
getString
(
"clientsecret"
));
socialsProvider
.
setAgentId
(
rs
.
getString
(
"agentId"
));
socialsProvider
.
setHidden
(
rs
.
getString
(
"hidden"
));
socialsProvider
.
setSortIndex
(
rs
.
getInt
(
"sortindex"
));
socialsProvider
.
setStatus
(
rs
.
getInt
(
"status"
));
return
socialsProvider
;
}
}
}
}
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/autoconfigure/SocialSignOnAutoConfiguration.java
浏览文件 @
4d3f1245
...
@@ -18,11 +18,9 @@
...
@@ -18,11 +18,9 @@
package
org.maxkey.autoconfigure
;
package
org.maxkey.autoconfigure
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.maxkey.authn.support.socialsignon.service.JdbcSocialsAssociateService
;
import
org.maxkey.authn.support.socialsignon.service.JdbcSocialsAssociateService
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProvider
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService
;
import
org.maxkey.entity.SocialsProvider
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.InitializingBean
;
...
@@ -30,7 +28,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
...
@@ -30,7 +28,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.jdbc.core.JdbcTemplate
;
@Configuration
@Configuration
...
@@ -41,45 +38,12 @@ public class SocialSignOnAutoConfiguration implements InitializingBean {
...
@@ -41,45 +38,12 @@ public class SocialSignOnAutoConfiguration implements InitializingBean {
private
static
final
Logger
_logger
=
LoggerFactory
.
getLogger
(
SocialSignOnAutoConfiguration
.
class
);
private
static
final
Logger
_logger
=
LoggerFactory
.
getLogger
(
SocialSignOnAutoConfiguration
.
class
);
@Bean
(
name
=
"socialSignOnProviderService"
)
@Bean
(
name
=
"socialSignOnProviderService"
)
@ConditionalOnClass
(
Social
SignOn
Provider
.
class
)
@ConditionalOnClass
(
Social
s
Provider
.
class
)
public
SocialSignOnProviderService
socialSignOnProviderService
(
public
SocialSignOnProviderService
socialSignOnProviderService
(
StandardEnvironment
environment
)
throws
IOException
{
JdbcTemplate
jdbcTemplate
)
throws
IOException
{
SocialSignOnProviderService
socialSignOnProviderService
=
new
SocialSignOnProviderService
();
SocialSignOnProviderService
socialSignOnProviderService
=
new
SocialSignOnProviderService
(
jdbcTemplate
);
//load Socials Providers from database
List
<
SocialSignOnProvider
>
socialSignOnProviderList
=
new
ArrayList
<
SocialSignOnProvider
>();
socialSignOnProviderService
.
loadSocialsProviders
();
String
[]
providerList
=
environment
.
getProperty
(
"maxkey.login.socialsignon.providers"
).
toString
().
split
(
","
);
for
(
String
provider
:
providerList
)
{
String
providerName
=
environment
.
getProperty
(
"maxkey.socialsignon."
+
provider
+
".provider.name"
);
String
icon
=
environment
.
getProperty
(
"maxkey.socialsignon."
+
provider
+
".icon"
);
String
clientId
=
environment
.
getProperty
(
"maxkey.socialsignon."
+
provider
+
".client.id"
);
String
clientSecret
=
environment
.
getProperty
(
"maxkey.socialsignon."
+
provider
+
".client.secret"
);
String
sortOrder
=
environment
.
getProperty
(
"maxkey.socialsignon."
+
provider
+
".sortorder"
);
String
agentId
=
environment
.
getProperty
(
"maxkey.socialsignon."
+
provider
+
".agent.id"
);
String
hidden
=
environment
.
getProperty
(
"maxkey.socialsignon."
+
provider
+
".hidden"
);
SocialSignOnProvider
socialSignOnProvider
=
new
SocialSignOnProvider
();
socialSignOnProvider
.
setProvider
(
provider
);
socialSignOnProvider
.
setProviderName
(
providerName
);
socialSignOnProvider
.
setIcon
(
icon
);
socialSignOnProvider
.
setClientId
(
clientId
);
socialSignOnProvider
.
setClientSecret
(
clientSecret
);
socialSignOnProvider
.
setSortOrder
(
Integer
.
valueOf
(
sortOrder
));
socialSignOnProvider
.
setAgentId
(
agentId
);
if
(
hidden
==
null
||
hidden
.
equalsIgnoreCase
(
"false"
))
{
socialSignOnProvider
.
setHidden
(
false
);
}
else
if
(
hidden
.
equalsIgnoreCase
(
"true"
)){
socialSignOnProvider
.
setHidden
(
true
);
}
_logger
.
debug
(
"socialSignOnProvider "
+
socialSignOnProvider
.
getProvider
()
+
"("
+
socialSignOnProvider
.
getProviderName
()+
")"
);
_logger
.
trace
(
"socialSignOnProvider "
+
socialSignOnProvider
);
socialSignOnProviderList
.
add
(
socialSignOnProvider
);
}
socialSignOnProviderService
.
setSocialSignOnProviders
(
socialSignOnProviderList
);
_logger
.
debug
(
"SocialSignOnProviderService inited."
);
_logger
.
debug
(
"SocialSignOnProviderService inited."
);
return
socialSignOnProviderService
;
return
socialSignOnProviderService
;
}
}
...
...
maxkey-
authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialSignOn
Provider.java
→
maxkey-
core/src/main/java/org/maxkey/entity/Socials
Provider.java
浏览文件 @
4d3f1245
/*
/*
* Copyright [202
0
] [MaxKey of copyright http://www.maxkey.top]
* Copyright [202
1
] [MaxKey of copyright http://www.maxkey.top]
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -15,35 +15,76 @@
...
@@ -15,35 +15,76 @@
*/
*/
package
org.maxkey.authn.support.socialsignon.service
;
package
org.maxkey.entity
;
import
java.io.Serializable
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
org.apache.mybatis.jpa.persistence.JpaBaseEntity
;
/**
/**
* @author Crystal.Sea
* @author Crystal.Sea
*
*
*/
*/
public
class
SocialSignOnProvider
{
@Entity
@Table
(
name
=
"MXK_SOCIALS_PROVIDER"
)
public
class
SocialsProvider
extends
JpaBaseEntity
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1636727203025187769L
;
@Id
@Column
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
,
generator
=
"snowflakeid"
)
private
String
id
;
@Column
private
String
provider
;
private
String
provider
;
@Column
private
String
providerName
;
private
String
providerName
;
@Column
private
String
icon
;
private
String
icon
;
@Column
private
String
clientId
;
private
String
clientId
;
@Column
private
String
clientSecret
;
private
String
clientSecret
;
@Column
private
String
agentId
;
@Column
private
String
hidden
;
@Column
private
long
sortIndex
;
@Column
private
int
status
;
@Column
String
createdBy
;
@Column
String
createdDate
;
@Column
String
modifiedBy
;
@Column
String
modifiedDate
;
private
String
redirectUri
;
private
String
redirectUri
;
private
String
agentId
;
private
String
accountId
;
private
String
accountId
;
private
String
bindTime
;
private
String
bindTime
;
private
String
unBindTime
;
private
String
unBindTime
;
private
String
lastLoginTime
;
private
String
lastLoginTime
;
private
String
state
;
private
String
state
;
private
int
sortOrder
;
private
boolean
hidden
;
private
boolean
userBind
;
private
boolean
userBind
;
/**
/**
*
*
*/
*/
public
Social
SignOn
Provider
()
{
public
Social
s
Provider
()
{
}
}
...
@@ -95,14 +136,6 @@ public class SocialSignOnProvider {
...
@@ -95,14 +136,6 @@ public class SocialSignOnProvider {
this
.
accountId
=
accountId
;
this
.
accountId
=
accountId
;
}
}
public
int
getSortOrder
()
{
return
sortOrder
;
}
public
void
setSortOrder
(
int
sortOrder
)
{
this
.
sortOrder
=
sortOrder
;
}
public
boolean
isUserBind
()
{
public
boolean
isUserBind
()
{
return
userBind
;
return
userBind
;
}
}
...
@@ -160,42 +193,120 @@ public class SocialSignOnProvider {
...
@@ -160,42 +193,120 @@ public class SocialSignOnProvider {
this
.
state
=
state
;
this
.
state
=
state
;
}
}
public
boolean
isHidden
()
{
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getHidden
()
{
return
hidden
;
return
hidden
;
}
}
public
void
setHidden
(
boolean
hidden
)
{
public
void
setHidden
(
String
hidden
)
{
this
.
hidden
=
hidden
;
this
.
hidden
=
hidden
;
}
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
String
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
String
getCreatedDate
()
{
return
createdDate
;
}
public
void
setCreatedDate
(
String
createdDate
)
{
this
.
createdDate
=
createdDate
;
}
public
String
getModifiedBy
()
{
return
modifiedBy
;
}
public
void
setModifiedBy
(
String
modifiedBy
)
{
this
.
modifiedBy
=
modifiedBy
;
}
public
String
getModifiedDate
()
{
return
modifiedDate
;
}
public
void
setModifiedDate
(
String
modifiedDate
)
{
this
.
modifiedDate
=
modifiedDate
;
}
public
long
getSortIndex
()
{
return
sortIndex
;
}
public
void
setSortIndex
(
long
sortIndex
)
{
this
.
sortIndex
=
sortIndex
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
"SocialSignOnProvider [provider="
);
builder
.
append
(
"SocialsProvider [id="
);
builder
.
append
(
provider
);
builder
.
append
(
id
);
builder
.
append
(
", providerName="
);
builder
.
append
(
", provider="
);
builder
.
append
(
providerName
);
builder
.
append
(
provider
);
builder
.
append
(
", clientId="
);
builder
.
append
(
", providerName="
);
builder
.
append
(
clientId
);
builder
.
append
(
providerName
);
builder
.
append
(
", clientSecret="
);
builder
.
append
(
", icon="
);
builder
.
append
(
clientSecret
);
builder
.
append
(
icon
);
builder
.
append
(
", agentId="
);
builder
.
append
(
", clientId="
);
builder
.
append
(
agentId
);
builder
.
append
(
clientId
);
builder
.
append
(
", accountId="
);
builder
.
append
(
", clientSecret="
);
builder
.
append
(
accountId
);
builder
.
append
(
clientSecret
);
builder
.
append
(
", bindTime="
);
builder
.
append
(
", agentId="
);
builder
.
append
(
bindTime
);
builder
.
append
(
agentId
);
builder
.
append
(
", unBindTime="
);
builder
.
append
(
", sortOrder="
);
builder
.
append
(
unBindTime
);
builder
.
append
(
sortOrder
);
builder
.
append
(
", lastLoginTime="
);
builder
.
append
(
", hidden="
);
builder
.
append
(
lastLoginTime
);
builder
.
append
(
hidden
);
builder
.
append
(
", sortOrder="
);
builder
.
append
(
", status="
);
builder
.
append
(
sortOrder
);
builder
.
append
(
status
);
builder
.
append
(
", userBind="
);
builder
.
append
(
", createdBy="
);
builder
.
append
(
userBind
);
builder
.
append
(
createdBy
);
builder
.
append
(
"]"
);
builder
.
append
(
", createdDate="
);
return
builder
.
toString
();
builder
.
append
(
createdDate
);
}
builder
.
append
(
", modifiedBy="
);
builder
.
append
(
modifiedBy
);
builder
.
append
(
", modifiedDate="
);
builder
.
append
(
modifiedDate
);
builder
.
append
(
", redirectUri="
);
builder
.
append
(
redirectUri
);
builder
.
append
(
", accountId="
);
builder
.
append
(
accountId
);
builder
.
append
(
", bindTime="
);
builder
.
append
(
bindTime
);
builder
.
append
(
", unBindTime="
);
builder
.
append
(
unBindTime
);
builder
.
append
(
", lastLoginTime="
);
builder
.
append
(
lastLoginTime
);
builder
.
append
(
", state="
);
builder
.
append
(
state
);
builder
.
append
(
", userBind="
);
builder
.
append
(
userBind
);
builder
.
append
(
"]"
);
return
builder
.
toString
();
}
...
...
maxkey-persistence/src/main/java/org/maxkey/persistence/mapper/SocialsProviderMapper.java
0 → 100644
浏览文件 @
4d3f1245
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed 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.maxkey.persistence.mapper
;
import
org.apache.mybatis.jpa.persistence.IJpaBaseMapper
;
import
org.maxkey.entity.SocialsProvider
;
/**
* @author Crystal.Sea
*
*/
public
interface
SocialsProviderMapper
extends
IJpaBaseMapper
<
SocialsProvider
>{
}
maxkey-persistence/src/main/java/org/maxkey/persistence/service/SocialsProviderService.java
0 → 100644
浏览文件 @
4d3f1245
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed 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.maxkey.persistence.service
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.maxkey.entity.SocialsProvider
;
import
org.maxkey.persistence.mapper.SocialsProviderMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
SocialsProviderService
extends
JpaBaseService
<
SocialsProvider
>{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
SocialsProviderService
.
class
);
public
SocialsProviderService
()
{
super
(
SocialsProviderMapper
.
class
);
}
/* (non-Javadoc)
* @see com.connsec.db.service.BaseService#getMapper()
*/
@Override
public
SocialsProviderMapper
getMapper
()
{
return
(
SocialsProviderMapper
)
super
.
getMapper
();
}
}
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/SocialsProviderMapper.xml
0 → 100644
浏览文件 @
4d3f1245
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.maxkey.persistence.mapper.SocialsProviderMapper"
>
<sql
id=
"where_statement"
>
<if
test=
"id != null and id != ''"
>
and id = #{id}
</if>
<if
test=
"providerName != null and providerName != ''"
>
and providerName like '%${providerName}%'
</if>
</sql>
<select
id=
"queryPageResults"
parameterType=
"SocialsProvider"
resultType=
"SocialsProvider"
>
select
*
from
mxk_socials_provider
where
(1=1)
<include
refid=
"where_statement"
/>
order by sortindex
</select>
</mapper>
\ No newline at end of file
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/binding/impl/ExtractPostBindingAdapter.java
浏览文件 @
4d3f1245
...
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
...
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.InitializingBean
;
public
class
ExtractPostBindingAdapter
implements
ExtractBindingAdapter
,
InitializingBean
{
public
class
ExtractPostBindingAdapter
implements
ExtractBindingAdapter
,
InitializingBean
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ExtractPostBindingAdapter
.
class
);
private
final
static
Logger
_
logger
=
LoggerFactory
.
getLogger
(
ExtractPostBindingAdapter
.
class
);
static
final
String
SAML_REQUEST_POST_PARAM_NAME
=
"SAMLRequest"
;
static
final
String
SAML_REQUEST_POST_PARAM_NAME
=
"SAMLRequest"
;
static
final
String
SAML_RESPONSE_POST_PARAM_NAME
=
"SAMLResponse"
;
static
final
String
SAML_RESPONSE_POST_PARAM_NAME
=
"SAMLResponse"
;
...
@@ -98,7 +98,7 @@ public class ExtractPostBindingAdapter implements ExtractBindingAdapter, Initial
...
@@ -98,7 +98,7 @@ public class ExtractPostBindingAdapter implements ExtractBindingAdapter, Initial
messageContext
.
setSecurityPolicyResolver
(
securityPolicyResolver
);
messageContext
.
setSecurityPolicyResolver
(
securityPolicyResolver
);
decoder
.
decode
(
messageContext
);
decoder
.
decode
(
messageContext
);
logger
.
debug
(
"decode successed "
);
_
logger
.
debug
(
"decode successed "
);
return
messageContext
;
return
messageContext
;
}
}
...
@@ -116,7 +116,9 @@ public class ExtractPostBindingAdapter implements ExtractBindingAdapter, Initial
...
@@ -116,7 +116,9 @@ public class ExtractPostBindingAdapter implements ExtractBindingAdapter, Initial
public
void
buildSecurityPolicyResolver
(
KeyStore
trustKeyStore
)
{
public
void
buildSecurityPolicyResolver
(
KeyStore
trustKeyStore
)
{
_logger
.
debug
(
"EntityName {}, KeystorePassword {}"
,
keyStoreLoader
.
getEntityName
(),
keyStoreLoader
.
getKeystorePassword
());
TrustResolver
trustResolver
=
new
TrustResolver
(
trustKeyStore
,
TrustResolver
trustResolver
=
new
TrustResolver
(
trustKeyStore
,
keyStoreLoader
.
getEntityName
(),
keyStoreLoader
.
getEntityName
(),
keyStoreLoader
.
getKeystorePassword
(),
keyStoreLoader
.
getKeystorePassword
(),
...
...
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/xml/AssertionGenerator.java
浏览文件 @
4d3f1245
...
@@ -115,7 +115,10 @@ public class AssertionGenerator {
...
@@ -115,7 +115,10 @@ public class AssertionGenerator {
assertion
.
setConditions
(
conditions
);
assertion
.
setConditions
(
conditions
);
//sign Assertion
//sign Assertion
try
{
try
{
if
(
bindingAdapter
.
getSigningCredential
()
==
null
)
{
throw
new
Exception
(
"Signing Credential is null..."
);
}
logger
.
debug
(
"EntityId "
+
bindingAdapter
.
getSigningCredential
().
getEntityId
());
BasicCredential
basicCredential
=
new
BasicCredential
();
BasicCredential
basicCredential
=
new
BasicCredential
();
basicCredential
.
setPrivateKey
(
bindingAdapter
.
getSigningCredential
().
getPrivateKey
());
basicCredential
.
setPrivateKey
(
bindingAdapter
.
getSigningCredential
().
getPrivateKey
());
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SocialSignOnListController.java
浏览文件 @
4d3f1245
...
@@ -20,11 +20,11 @@ package org.maxkey.web.contorller;
...
@@ -20,11 +20,11 @@ package org.maxkey.web.contorller;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProvider
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService
;
import
org.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociate
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociate
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociateService
;
import
org.maxkey.authn.support.socialsignon.service.SocialsAssociateService
;
import
org.maxkey.configuration.ApplicationConfig
;
import
org.maxkey.configuration.ApplicationConfig
;
import
org.maxkey.entity.SocialsProvider
;
import
org.maxkey.web.WebContext
;
import
org.maxkey.web.WebContext
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -55,16 +55,16 @@ public class SocialSignOnListController {
...
@@ -55,16 +55,16 @@ public class SocialSignOnListController {
ModelAndView
modelAndView
=
new
ModelAndView
(
"social/socialSignOnProvider"
);
ModelAndView
modelAndView
=
new
ModelAndView
(
"social/socialSignOnProvider"
);
if
(
applicationConfig
.
getLoginConfig
().
isSocialSignOn
()){
if
(
applicationConfig
.
getLoginConfig
().
isSocialSignOn
()){
List
<
Social
SignOn
Provider
>
listSocialSignOnProvider
=
socialSignOnProviderService
.
getSocialSignOnProviders
();
List
<
Social
s
Provider
>
listSocialSignOnProvider
=
socialSignOnProviderService
.
getSocialSignOnProviders
();
SocialsAssociate
socialSignOnUser
=
new
SocialsAssociate
();
SocialsAssociate
socialSignOnUser
=
new
SocialsAssociate
();
socialSignOnUser
.
setUserId
(
WebContext
.
getUserInfo
().
getId
());
socialSignOnUser
.
setUserId
(
WebContext
.
getUserInfo
().
getId
());
List
<
SocialsAssociate
>
listSocialSignOnUserToken
=
socialSignOnUserService
.
query
(
socialSignOnUser
);
List
<
SocialsAssociate
>
listSocialSignOnUserToken
=
socialSignOnUserService
.
query
(
socialSignOnUser
);
List
<
Social
SignOnProvider
>
listBindSocialSignOnProvider
=
new
ArrayList
<
SocialSignOn
Provider
>();
List
<
Social
sProvider
>
listBindSocialSignOnProvider
=
new
ArrayList
<
Socials
Provider
>();
_logger
.
debug
(
"list SocialSignOnProvider : "
+
listSocialSignOnProvider
);
_logger
.
debug
(
"list SocialSignOnProvider : "
+
listSocialSignOnProvider
);
_logger
.
debug
(
"list SocialSignOnUserToken : "
+
listSocialSignOnUserToken
);
_logger
.
debug
(
"list SocialSignOnUserToken : "
+
listSocialSignOnUserToken
);
for
(
Social
SignOn
Provider
ssop
:
listSocialSignOnProvider
){
for
(
Social
s
Provider
ssop
:
listSocialSignOnProvider
){
Social
SignOnProvider
socialSignOnProvider
=
new
SocialSignOn
Provider
();
Social
sProvider
socialSignOnProvider
=
new
Socials
Provider
();
socialSignOnProvider
.
setProvider
(
ssop
.
getProvider
());
socialSignOnProvider
.
setProvider
(
ssop
.
getProvider
());
socialSignOnProvider
.
setProviderName
(
ssop
.
getProviderName
());
socialSignOnProvider
.
setProviderName
(
ssop
.
getProviderName
());
socialSignOnProvider
.
setIcon
(
ssop
.
getIcon
());
socialSignOnProvider
.
setIcon
(
ssop
.
getIcon
());
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/application-http.properties
浏览文件 @
4d3f1245
...
@@ -58,8 +58,6 @@ maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
...
@@ -58,8 +58,6 @@ maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
maxkey.login.mfa.type
=
${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
maxkey.login.mfa.type
=
${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
#enable social sign on
#enable social sign on
maxkey.login.socialsignon
=
${LOGIN_SOCIAL_ENABLED:true}
maxkey.login.socialsignon
=
${LOGIN_SOCIAL_ENABLED:true}
#social sign on providers
maxkey.login.socialsignon.providers
=
${LOGIN_SOCIAL_PROVIDERS:gitee,wechatopen,sinaweibo,google,qq,dingtalk,microsoft,facebook,workweixin}
#Enable kerberos/SPNEGO
#Enable kerberos/SPNEGO
maxkey.login.kerberos
=
false
maxkey.login.kerberos
=
false
#wsFederation
#wsFederation
...
@@ -312,93 +310,6 @@ maxkey.saml.v20.metadata.surName =maxkey
...
@@ -312,93 +310,6 @@ maxkey.saml.v20.metadata.surName =maxkey
maxkey.saml.v20.metadata.emailAddress
=
maxkeysupport@163.com
maxkey.saml.v20.metadata.emailAddress
=
maxkeysupport@163.com
maxkey.saml.v20.metadata.telephoneNumber
=
4008981111
maxkey.saml.v20.metadata.telephoneNumber
=
4008981111
############################################################################
# Social Sign On Configuration #
#you config client.id & client.secret only #
############################################################################
#gitee
maxkey.socialsignon.gitee.provider
=
gitee
maxkey.socialsignon.gitee.provider.name
=
Gitee
maxkey.socialsignon.gitee.icon
=
images/social/gitee.png
maxkey.socialsignon.gitee.client.id
=
${SOCIAL_GITEE_CLIENTID:ee6fdc484b3398d17e77d6ff37fd8b9fe502106398c7b22bf5522d3c01303f45}
maxkey.socialsignon.gitee.client.secret
=
${SOCIAL_GITEE_CLIENTSECRET:d6c3558f295f044df538c966a9084166f9a877c7a7392543184007a5faccdbad}
maxkey.socialsignon.gitee.account.id
=
id
maxkey.socialsignon.gitee.hidden
=
false
maxkey.socialsignon.gitee.sortorder
=
1
#wechat
maxkey.socialsignon.wechatopen.provider
=
wechatopen
maxkey.socialsignon.wechatopen.provider.name
=
\u
5fae
\u
4fe1
maxkey.socialsignon.wechatopen.icon
=
images/social/wechat.png
maxkey.socialsignon.wechatopen.client.id
=
${SOCIAL_WECHATOPEN_CLIENTID:ee6fdc484b3398d17e7}
maxkey.socialsignon.wechatopen.client.secret
=
${SOCIAL_WECHATOPEN_CLIENTSECRET:7a5faccdbad}
maxkey.socialsignon.wechatopen.account.id
=
id
maxkey.socialsignon.wechatopen.hidden
=
false
maxkey.socialsignon.wechatopen.sortorder
=
2
#work weixin
maxkey.socialsignon.workweixin.provider
=
workweixin
maxkey.socialsignon.workweixin.provider.name
=
\u
4F01
\u
4E1A
\u
5fae
\u
4fe1
maxkey.socialsignon.workweixin.icon
=
images/social/wechat_enterprise.png
maxkey.socialsignon.workweixin.client.id
=
${SOCIAL_WORKWEIXIN_CLIENTID:ww61ca142e1fe5b8ca}
maxkey.socialsignon.workweixin.client.secret
=
${SOCIAL_WORKWEIXIN_CLIENTSECRET:CfWEoALuKdSKzXiV-QWXeGSD5zPd6Svze3GR_gB5eFs}
maxkey.socialsignon.workweixin.agent.id
=
${SOCIAL_WORKWEIXIN_AGENTID:1000002}
maxkey.socialsignon.workweixin.account.id
=
id
maxkey.socialsignon.workweixin.hidden
=
true
maxkey.socialsignon.workweixin.sortorder
=
2
#sina weibo
maxkey.socialsignon.sinaweibo.provider
=
sinaweibo
maxkey.socialsignon.sinaweibo.provider.name
=
\u
65b0
\u
6d6a
\u
5fae
\u
535a
maxkey.socialsignon.sinaweibo.icon
=
images/social/weibo.png
maxkey.socialsignon.sinaweibo.client.id
=
${SOCIAL_SINAWEIBO_CLIENTID:3379757634}
maxkey.socialsignon.sinaweibo.client.secret
=
${SOCIAL_SINAWEIBO_CLIENTSECRET:1adfdf9800299037bcab9d1c238664ba}
maxkey.socialsignon.sinaweibo.account.id
=
id
maxkey.socialsignon.sinaweibo.hidden
=
false
maxkey.socialsignon.sinaweibo.sortorder
=
3
#Google
maxkey.socialsignon.google.provider
=
google
maxkey.socialsignon.google.provider.name
=
Google
maxkey.socialsignon.google.icon
=
images/social/google.png
maxkey.socialsignon.google.client.id
=
${SOCIAL_GOOGLE_CLIENTID:519914515488.apps.googleusercontent.com}
maxkey.socialsignon.google.client.secret
=
${SOCIAL_GOOGLE_CLIENTSECRET:3aTW3Iw7e11QqMnHxciCaXTt}
maxkey.socialsignon.google.account.id
=
id
maxkey.socialsignon.google.hidden
=
false
maxkey.socialsignon.google.sortorder
=
4
#dingtalk
maxkey.socialsignon.dingtalk.provider
=
dingtalk
maxkey.socialsignon.dingtalk.provider.name
=
dingtalk
maxkey.socialsignon.dingtalk.icon
=
images/social/dingtalk.png
maxkey.socialsignon.dingtalk.client.id
=
${SOCIAL_DINGTALK_CLIENTID:dingoawf2jyiwh2uzqnphg}
maxkey.socialsignon.dingtalk.client.secret
=
${SOCIAL_DINGTALK_CLIENTSECRET:Crm7YJbMKfRlvG2i1SHpg4GHVpqF_oXiEjhmRQyiSiuzNRWpbFh9i0UjDTfhOoN9}
maxkey.socialsignon.dingtalk.account.id
=
openid
maxkey.socialsignon.dingtalk.hidden
=
false
maxkey.socialsignon.dingtalk.sortorder
=
5
#QQ
maxkey.socialsignon.qq.provider
=
qq
maxkey.socialsignon.qq.provider.name
=
QQ
maxkey.socialsignon.qq.icon
=
images/social/qq.png
maxkey.socialsignon.qq.client.id
=
${SOCIAL_QQ_CLIENTID:101225363}
maxkey.socialsignon.qq.client.secret
=
${SOCIAL_QQ_CLIENTSECRET:8577d75e0eb4a91ac549cc8be3371bfd}
maxkey.socialsignon.qq.account.id
=
openid
maxkey.socialsignon.qq.hidden
=
false
maxkey.socialsignon.qq.sortorder
=
6
#Microsoft
maxkey.socialsignon.microsoft.provider
=
microsoft
maxkey.socialsignon.microsoft.provider.name
=
Microsoft
maxkey.socialsignon.microsoft.icon
=
images/social/microsoft.png
maxkey.socialsignon.microsoft.client.id
=
${SOCIAL_MICROSOFT_CLIENTID:24aa73b6-7928-4e64-bd64-d8682e650f95}
maxkey.socialsignon.microsoft.client.secret
=
${SOCIAL_MICROSOFT_CLIENTSECRET:PF[_AthtjVrtWVO2mNy@CJxY1@Z8FNf5}
maxkey.socialsignon.microsoft.account.id
=
id
maxkey.socialsignon.microsoft.hidden
=
false
maxkey.socialsignon.microsoft.sortorder
=
7
#facebook
maxkey.socialsignon.facebook.provider
=
facebook
maxkey.socialsignon.facebook.provider.name
=
facebook
maxkey.socialsignon.facebook.icon
=
images/social/facebook.png
maxkey.socialsignon.facebook.client.id
=
${SOCIAL_FACEBOOK_CLIENTID:appKey}
maxkey.socialsignon.facebook.client.secret
=
${SOCIAL_FACEBOOK_CLIENTSECRET:appSecret}
maxkey.socialsignon.facebook.account.id
=
id
maxkey.socialsignon.facebook.hidden
=
false
maxkey.socialsignon.facebook.sortorder
=
8
############################################################################
############################################################################
#Management endpoints configuration #
#Management endpoints configuration #
############################################################################
############################################################################
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/application-https.properties
浏览文件 @
4d3f1245
...
@@ -59,8 +59,6 @@ maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
...
@@ -59,8 +59,6 @@ maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
maxkey.login.mfa.type
=
${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
maxkey.login.mfa.type
=
${LOGIN_MFA_TYPE:TimeBasedOtpAuthn}
#enable social sign on
#enable social sign on
maxkey.login.socialsignon
=
${LOGIN_SOCIAL_ENABLED:true}
maxkey.login.socialsignon
=
${LOGIN_SOCIAL_ENABLED:true}
#social sign on providers
maxkey.login.socialsignon.providers
=
${LOGIN_SOCIAL_PROVIDERS:gitee,wechatopen,sinaweibo,google,qq,dingtalk,microsoft,facebook,workweixin}
#Enable kerberos/SPNEGO
#Enable kerberos/SPNEGO
maxkey.login.kerberos
=
false
maxkey.login.kerberos
=
false
#wsFederation
#wsFederation
...
@@ -314,93 +312,6 @@ maxkey.saml.v20.metadata.surName =maxkey
...
@@ -314,93 +312,6 @@ maxkey.saml.v20.metadata.surName =maxkey
maxkey.saml.v20.metadata.emailAddress
=
maxkeysupport@163.com
maxkey.saml.v20.metadata.emailAddress
=
maxkeysupport@163.com
maxkey.saml.v20.metadata.telephoneNumber
=
4008981111
maxkey.saml.v20.metadata.telephoneNumber
=
4008981111
############################################################################
# Social Sign On Configuration #
#you config client.id & client.secret only #
############################################################################
#gitee
maxkey.socialsignon.gitee.provider
=
gitee
maxkey.socialsignon.gitee.provider.name
=
Gitee
maxkey.socialsignon.gitee.icon
=
images/social/gitee.png
maxkey.socialsignon.gitee.client.id
=
${SOCIAL_GITEE_CLIENTID:ee6fdc484b3398d17e77d6ff37fd8b9fe502106398c7b22bf5522d3c01303f45}
maxkey.socialsignon.gitee.client.secret
=
${SOCIAL_GITEE_CLIENTSECRET:d6c3558f295f044df538c966a9084166f9a877c7a7392543184007a5faccdbad}
maxkey.socialsignon.gitee.account.id
=
id
maxkey.socialsignon.gitee.hidden
=
false
maxkey.socialsignon.gitee.sortorder
=
1
#wechat
maxkey.socialsignon.wechatopen.provider
=
wechatopen
maxkey.socialsignon.wechatopen.provider.name
=
\u
5fae
\u
4fe1
maxkey.socialsignon.wechatopen.icon
=
images/social/wechat.png
maxkey.socialsignon.wechatopen.client.id
=
${SOCIAL_WECHATOPEN_CLIENTID:ee6fdc484b3398d17e7}
maxkey.socialsignon.wechatopen.client.secret
=
${SOCIAL_WECHATOPEN_CLIENTSECRET:7a5faccdbad}
maxkey.socialsignon.wechatopen.account.id
=
id
maxkey.socialsignon.wechatopen.hidden
=
false
maxkey.socialsignon.wechatopen.sortorder
=
2
#work weixin
maxkey.socialsignon.workweixin.provider
=
workweixin
maxkey.socialsignon.workweixin.provider.name
=
\u
4F01
\u
4E1A
\u
5fae
\u
4fe1
maxkey.socialsignon.workweixin.icon
=
images/social/wechat_enterprise.png
maxkey.socialsignon.workweixin.client.id
=
${SOCIAL_WORKWEIXIN_CLIENTID:ww61ca142e1fe5b8ca}
maxkey.socialsignon.workweixin.client.secret
=
${SOCIAL_WORKWEIXIN_CLIENTSECRET:CfWEoALuKdSKzXiV-QWXeGSD5zPd6Svze3GR_gB5eFs}
maxkey.socialsignon.workweixin.agent.id
=
${SOCIAL_WORKWEIXIN_AGENTID:1000002}
maxkey.socialsignon.workweixin.account.id
=
id
maxkey.socialsignon.workweixin.hidden
=
true
maxkey.socialsignon.workweixin.sortorder
=
2
#sina weibo
maxkey.socialsignon.sinaweibo.provider
=
sinaweibo
maxkey.socialsignon.sinaweibo.provider.name
=
\u
65b0
\u
6d6a
\u
5fae
\u
535a
maxkey.socialsignon.sinaweibo.icon
=
images/social/weibo.png
maxkey.socialsignon.sinaweibo.client.id
=
${SOCIAL_SINAWEIBO_CLIENTID:3379757634}
maxkey.socialsignon.sinaweibo.client.secret
=
${SOCIAL_SINAWEIBO_CLIENTSECRET:1adfdf9800299037bcab9d1c238664ba}
maxkey.socialsignon.sinaweibo.account.id
=
id
maxkey.socialsignon.sinaweibo.hidden
=
false
maxkey.socialsignon.sinaweibo.sortorder
=
3
#Google
maxkey.socialsignon.google.provider
=
google
maxkey.socialsignon.google.provider.name
=
Google
maxkey.socialsignon.google.icon
=
images/social/google.png
maxkey.socialsignon.google.client.id
=
${SOCIAL_GOOGLE_CLIENTID:519914515488.apps.googleusercontent.com}
maxkey.socialsignon.google.client.secret
=
${SOCIAL_GOOGLE_CLIENTSECRET:3aTW3Iw7e11QqMnHxciCaXTt}
maxkey.socialsignon.google.account.id
=
id
maxkey.socialsignon.google.hidden
=
false
maxkey.socialsignon.google.sortorder
=
4
#dingtalk
maxkey.socialsignon.dingtalk.provider
=
dingtalk
maxkey.socialsignon.dingtalk.provider.name
=
dingtalk
maxkey.socialsignon.dingtalk.icon
=
images/social/dingtalk.png
maxkey.socialsignon.dingtalk.client.id
=
${SOCIAL_DINGTALK_CLIENTID:dingoawf2jyiwh2uzqnphg}
maxkey.socialsignon.dingtalk.client.secret
=
${SOCIAL_DINGTALK_CLIENTSECRET:Crm7YJbMKfRlvG2i1SHpg4GHVpqF_oXiEjhmRQyiSiuzNRWpbFh9i0UjDTfhOoN9}
maxkey.socialsignon.dingtalk.account.id
=
openid
maxkey.socialsignon.dingtalk.hidden
=
false
maxkey.socialsignon.dingtalk.sortorder
=
5
#QQ
maxkey.socialsignon.qq.provider
=
qq
maxkey.socialsignon.qq.provider.name
=
QQ
maxkey.socialsignon.qq.icon
=
images/social/qq.png
maxkey.socialsignon.qq.client.id
=
${SOCIAL_QQ_CLIENTID:101225363}
maxkey.socialsignon.qq.client.secret
=
${SOCIAL_QQ_CLIENTSECRET:8577d75e0eb4a91ac549cc8be3371bfd}
maxkey.socialsignon.qq.account.id
=
openid
maxkey.socialsignon.qq.hidden
=
false
maxkey.socialsignon.qq.sortorder
=
6
#Microsoft
maxkey.socialsignon.microsoft.provider
=
microsoft
maxkey.socialsignon.microsoft.provider.name
=
Microsoft
maxkey.socialsignon.microsoft.icon
=
images/social/microsoft.png
maxkey.socialsignon.microsoft.client.id
=
${SOCIAL_MICROSOFT_CLIENTID:24aa73b6-7928-4e64-bd64-d8682e650f95}
maxkey.socialsignon.microsoft.client.secret
=
${SOCIAL_MICROSOFT_CLIENTSECRET:PF[_AthtjVrtWVO2mNy@CJxY1@Z8FNf5}
maxkey.socialsignon.microsoft.account.id
=
id
maxkey.socialsignon.microsoft.hidden
=
false
maxkey.socialsignon.microsoft.sortorder
=
7
#facebook
maxkey.socialsignon.facebook.provider
=
facebook
maxkey.socialsignon.facebook.provider.name
=
facebook
maxkey.socialsignon.facebook.icon
=
images/social/facebook.png
maxkey.socialsignon.facebook.client.id
=
${SOCIAL_FACEBOOK_CLIENTID:appKey}
maxkey.socialsignon.facebook.client.secret
=
${SOCIAL_FACEBOOK_CLIENTSECRET:appSecret}
maxkey.socialsignon.facebook.account.id
=
id
maxkey.socialsignon.facebook.hidden
=
false
maxkey.socialsignon.facebook.sortorder
=
8
############################################################################
############################################################################
#Management endpoints configuration #
#Management endpoints configuration #
############################################################################
############################################################################
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/MaxKeyMgtMvcConfig.java
浏览文件 @
4d3f1245
...
@@ -127,6 +127,8 @@ public class MaxKeyMgtMvcConfig implements WebMvcConfigurer {
...
@@ -127,6 +127,8 @@ public class MaxKeyMgtMvcConfig implements WebMvcConfigurer {
.
addPathPatterns
(
"/historys/**"
)
.
addPathPatterns
(
"/historys/**"
)
.
addPathPatterns
(
"/historys/**/**"
)
.
addPathPatterns
(
"/historys/**/**"
)
.
addPathPatterns
(
"/session/**"
)
.
addPathPatterns
(
"/session/**"
)
.
addPathPatterns
(
"/socialsprovider/**"
)
.
addPathPatterns
(
"/accountsstrategy/**"
)
;
;
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/contorller/SocialsProviderController.java
0 → 100644
浏览文件 @
4d3f1245
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed 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.maxkey.web.contorller
;
import
org.apache.mybatis.jpa.persistence.JpaPageResults
;
import
org.maxkey.constants.ConstantsOperateMessage
;
import
org.maxkey.entity.SocialsProvider
;
import
org.maxkey.persistence.service.SocialsProviderService
;
import
org.maxkey.web.WebContext
;
import
org.maxkey.web.message.Message
;
import
org.maxkey.web.message.MessageType
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.servlet.ModelAndView
;
@Controller
@RequestMapping
(
value
={
"/socialsprovider"
})
public
class
SocialsProviderController
{
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
SocialsProviderController
.
class
);
@Autowired
SocialsProviderService
socialsProviderService
;
@RequestMapping
(
value
={
"/list"
})
public
ModelAndView
noticesList
(){
return
new
ModelAndView
(
"socialsprovider/socialsProviderList"
);
}
@RequestMapping
(
value
=
{
"/grid"
})
@ResponseBody
public
JpaPageResults
<
SocialsProvider
>
queryDataGrid
(
@ModelAttribute
(
"socialsProvider"
)
SocialsProvider
socialsProvider
)
{
_logger
.
debug
(
""
+
socialsProvider
);
return
socialsProviderService
.
queryPageResults
(
socialsProvider
);
}
@RequestMapping
(
value
=
{
"/forwardAdd"
})
public
ModelAndView
forwardAdd
()
{
return
new
ModelAndView
(
"socialsprovider/socialsProviderAdd"
);
}
@RequestMapping
(
value
=
{
"/forwardUpdate/{id}"
})
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"socialsprovider/socialsProviderUpdate"
);
modelAndView
.
addObject
(
"model"
,
socialsProviderService
.
get
(
id
));
return
modelAndView
;
}
@ResponseBody
@RequestMapping
(
value
={
"/add"
})
public
Message
insert
(
@ModelAttribute
(
"socialsProvider"
)
SocialsProvider
socialsProvider
)
{
_logger
.
debug
(
"-Add :"
+
socialsProvider
);
if
(
socialsProviderService
.
insert
(
socialsProvider
))
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
INSERT_SUCCESS
),
MessageType
.
success
);
}
else
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
INSERT_SUCCESS
),
MessageType
.
error
);
}
}
/**
* 查询
* @param role
* @return
*/
@ResponseBody
@RequestMapping
(
value
={
"/query"
})
public
Message
query
(
@ModelAttribute
(
"socialsProvider"
)
SocialsProvider
socialsProvider
)
{
_logger
.
debug
(
"-query :"
+
socialsProvider
);
if
(
socialsProviderService
.
load
(
socialsProvider
)!=
null
)
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
INSERT_SUCCESS
),
MessageType
.
success
);
}
else
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
INSERT_ERROR
),
MessageType
.
error
);
}
}
/**
* 修改
* @param role
* @return
*/
@ResponseBody
@RequestMapping
(
value
={
"/update"
})
public
Message
update
(
@ModelAttribute
(
"socialsProvider"
)
SocialsProvider
socialsProvider
)
{
_logger
.
debug
(
"-update socialsProvider :"
+
socialsProvider
);
if
(
socialsProviderService
.
update
(
socialsProvider
))
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
UPDATE_SUCCESS
),
MessageType
.
success
);
}
else
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
UPDATE_ERROR
),
MessageType
.
error
);
}
}
@ResponseBody
@RequestMapping
(
value
={
"/delete"
})
public
Message
delete
(
@ModelAttribute
(
"socialsProvider"
)
SocialsProvider
socialsProvider
)
{
_logger
.
debug
(
"-delete socialsProvider :"
+
socialsProvider
);
if
(
socialsProviderService
.
batchDelete
(
socialsProvider
.
getId
()))
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
DELETE_SUCCESS
),
MessageType
.
success
);
}
else
{
return
new
Message
(
WebContext
.
getI18nValue
(
ConstantsOperateMessage
.
DELETE_SUCCESS
),
MessageType
.
error
);
}
}
}
maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message.properties
浏览文件 @
4d3f1245
...
@@ -36,6 +36,7 @@ common.text.createddate=\u521b\u5efa\u65f6\u95f4
...
@@ -36,6 +36,7 @@ common.text.createddate=\u521b\u5efa\u65f6\u95f4
common.text.modifiedby
=
\u
4fee
\u6539\u
4eba
common.text.modifiedby
=
\u
4fee
\u6539\u
4eba
common.text.modifieddate
=
\u
4fee
\u6539\u
65f6
\u
95f4
common.text.modifieddate
=
\u
4fee
\u6539\u
65f6
\u
95f4
common.text.sortindex
=
\u6392\u
5e8f
common.text.sortindex
=
\u6392\u
5e8f
common.text.status
=
\u
72B6
\u6001
common.text.status.start
=
\u
5f00
\u
59cb
common.text.status.start
=
\u
5f00
\u
59cb
common.text.status.normal
=
\u
6b63
\u
5e38
common.text.status.normal
=
\u
6b63
\u
5e38
common.text.status.validated
=
\u6709\u6548
common.text.status.validated
=
\u6709\u6548
...
@@ -453,6 +454,15 @@ accounts.strategy.name=\u7B56\u7565\u540D\u79F0
...
@@ -453,6 +454,15 @@ accounts.strategy.name=\u7B56\u7565\u540D\u79F0
accounts.strategy.mapping
=
\u
8D26
\u
53F7
\u6620\u
5C04
accounts.strategy.mapping
=
\u
8D26
\u
53F7
\u6620\u
5C04
accounts.strategy.filters
=
\u7528\u6237\u6761\u
4EF6
accounts.strategy.filters
=
\u7528\u6237\u6761\u
4EF6
accounts.strategy.orgidslist
=
\u
673A
\u6784\u5217\u8868
accounts.strategy.orgidslist
=
\u
673A
\u6784\u5217\u8868
#socials.provider
socials.provider.id
=
\u
7F16
\u
53F7
socials.provider.provider
=
\u
63D0
\u
4F9B
\u8005
socials.provider.providerName
=
\u
540D
\u
79F0
socials.provider.icon
=
\u
56FE
\u6807
socials.provider.clientId
=
\u
51ED
\u
8BC1
socials.provider.clientSecret
=
\u
5BC6
\u
94A5
socials.provider.agentId
=
AgentId
socials.provider.hidden
=
\u9690\u
85CF
#synchronizers
#synchronizers
synchronizers.id
=
\u
7F16
\u
53F7
synchronizers.id
=
\u
7F16
\u
53F7
synchronizers.name
=
\u
540C
\u
6B65
\u5668\u
540D
\u
79F0
synchronizers.name
=
\u
540C
\u
6B65
\u5668\u
540D
\u
79F0
...
@@ -592,4 +602,5 @@ navs.role.permissions=\u89d2\u8272\u6743\u9650\u7ba1\u7406
...
@@ -592,4 +602,5 @@ navs.role.permissions=\u89d2\u8272\u6743\u9650\u7ba1\u7406
navs.resources
=
\u
8d44
\u
6e90
\u
7ba1
\u7406
navs.resources
=
\u
8d44
\u
6e90
\u
7ba1
\u7406
navs.adapters
=
\u9002\u
914D
\u5668\u
6CE8
\u
518C
navs.adapters
=
\u9002\u
914D
\u5668\u
6CE8
\u
518C
navs.notices
=
\u
901A
\u
77E5
\u
516C
\u
544A
navs.notices
=
\u
901A
\u
77E5
\u
516C
\u
544A
navs.socials.provider
=
\u
793E
\u
4EA4
\u
63D0
\u
4F9B
\u5546
navs.synchronizers
=
\u
540C
\u
6B65
\u5668\u
7BA1
\u7406
navs.synchronizers
=
\u
540C
\u
6B65
\u5668\u
7BA1
\u7406
\ No newline at end of file
maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_en.properties
浏览文件 @
4d3f1245
...
@@ -36,6 +36,7 @@ common.text.createddate=CreatedDate
...
@@ -36,6 +36,7 @@ common.text.createddate=CreatedDate
common.text.modifiedby
=
ModifiedBy
common.text.modifiedby
=
ModifiedBy
common.text.modifieddate
=
ModifiedDate
common.text.modifieddate
=
ModifiedDate
common.text.sortindex
=
sort
common.text.sortindex
=
sort
common.text.status
=
status
common.text.status.start
=
start
common.text.status.start
=
start
common.text.status.normal
=
normal
common.text.status.normal
=
normal
common.text.status.validated
=
validated
common.text.status.validated
=
validated
...
@@ -462,6 +463,15 @@ accounts.strategy.mapping=mapping
...
@@ -462,6 +463,15 @@ accounts.strategy.mapping=mapping
accounts.strategy.filters
=
filters
accounts.strategy.filters
=
filters
accounts.strategy.orgidslist
=
orgIdsList
accounts.strategy.orgidslist
=
orgIdsList
socials.provider.id
=
Id
socials.provider.provider
=
Provider
socials.provider.providerName
=
ProviderName
socials.provider.icon
=
Icon
socials.provider.clientId
=
ClientId
socials.provider.clientSecret
=
ClientSecret
socials.provider.agentId
=
AgentId
socials.provider.hidden
=
Hidden
#synchronizers
#synchronizers
synchronizers.id
=
id
synchronizers.id
=
id
synchronizers.name
=
name
synchronizers.name
=
name
...
@@ -602,4 +612,5 @@ navs.role.permissions=Permissions
...
@@ -602,4 +612,5 @@ navs.role.permissions=Permissions
navs.resources
=
Resources
navs.resources
=
Resources
navs.adapters
=
Adapters
navs.adapters
=
Adapters
navs.notices
=
Notices
navs.notices
=
Notices
navs.socials.provider
=
SocialsProvider
navs.synchronizers
=
Synchronizers
navs.synchronizers
=
Synchronizers
\ No newline at end of file
maxkey-webs/maxkey-web-mgt/src/main/resources/messages/message_zh_CN.properties
浏览文件 @
4d3f1245
...
@@ -36,6 +36,7 @@ common.text.createddate=\u521b\u5efa\u65f6\u95f4
...
@@ -36,6 +36,7 @@ common.text.createddate=\u521b\u5efa\u65f6\u95f4
common.text.modifiedby
=
\u
4fee
\u6539\u
4eba
common.text.modifiedby
=
\u
4fee
\u6539\u
4eba
common.text.modifieddate
=
\u
4fee
\u6539\u
65f6
\u
95f4
common.text.modifieddate
=
\u
4fee
\u6539\u
65f6
\u
95f4
common.text.sortindex
=
\u6392\u
5e8f
common.text.sortindex
=
\u6392\u
5e8f
common.text.status
=
\u
72B6
\u6001
common.text.status.start
=
\u
5f00
\u
59cb
common.text.status.start
=
\u
5f00
\u
59cb
common.text.status.normal
=
\u
6b63
\u
5e38
common.text.status.normal
=
\u
6b63
\u
5e38
common.text.status.validated
=
\u6709\u6548
common.text.status.validated
=
\u6709\u6548
...
@@ -459,6 +460,15 @@ accounts.strategy.name=\u7B56\u7565\u540D\u79F0
...
@@ -459,6 +460,15 @@ accounts.strategy.name=\u7B56\u7565\u540D\u79F0
accounts.strategy.mapping
=
\u
8D26
\u
53F7
\u6620\u
5C04
accounts.strategy.mapping
=
\u
8D26
\u
53F7
\u6620\u
5C04
accounts.strategy.filters
=
\u7528\u6237\u6761\u
4EF6
accounts.strategy.filters
=
\u7528\u6237\u6761\u
4EF6
accounts.strategy.orgidslist
=
\u
673A
\u6784\u5217\u8868
accounts.strategy.orgidslist
=
\u
673A
\u6784\u5217\u8868
#socials.provider
socials.provider.id
=
\u
7F16
\u
53F7
socials.provider.provider
=
\u
63D0
\u
4F9B
\u8005
socials.provider.providerName
=
\u
540D
\u
79F0
socials.provider.icon
=
\u
56FE
\u6807
socials.provider.clientId
=
\u
51ED
\u
8BC1
socials.provider.clientSecret
=
\u
5BC6
\u
94A5
socials.provider.agentId
=
AgentId
socials.provider.hidden
=
\u9690\u
85CF
#synchronizers
#synchronizers
synchronizers.id
=
\u
7F16
\u
53F7
synchronizers.id
=
\u
7F16
\u
53F7
synchronizers.name
=
\u
540C
\u
6B65
\u5668\u
540D
\u
79F0
synchronizers.name
=
\u
540C
\u
6B65
\u5668\u
540D
\u
79F0
...
@@ -597,4 +607,5 @@ navs.role.permissions=\u89d2\u8272\u6743\u9650\u7ba1\u7406
...
@@ -597,4 +607,5 @@ navs.role.permissions=\u89d2\u8272\u6743\u9650\u7ba1\u7406
navs.resources
=
\u
8d44
\u
6e90
\u
7ba1
\u7406
navs.resources
=
\u
8d44
\u
6e90
\u
7ba1
\u7406
navs.adapters
=
\u9002\u
914D
\u5668\u
6CE8
\u
518C
navs.adapters
=
\u9002\u
914D
\u5668\u
6CE8
\u
518C
navs.notices
=
\u
901A
\u
77E5
\u
516C
\u
544A
navs.notices
=
\u
901A
\u
77E5
\u
516C
\u
544A
navs.socials.provider
=
\u
793E
\u
4EA4
\u
63D0
\u
4F9B
\u5546
navs.synchronizers
=
\u
540C
\u
6B65
\u5668\u
7BA1
\u7406
navs.synchronizers
=
\u
540C
\u
6B65
\u5668\u
7BA1
\u7406
\ No newline at end of file
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/layout/sidenav.ftl
浏览文件 @
4d3f1245
...
@@ -102,7 +102,13 @@
...
@@ -102,7 +102,13 @@
<li>
<li>
<a class="side-nav-menu" href="<@base />/accountsstrategy/list/">
<a class="side-nav-menu" href="<@base />/accountsstrategy/list/">
<@locale code="navs.accounts.strategy"/>
<@locale code="navs.accounts.strategy"/>
<span class="fa fa-fw fa-globe fa-lg"></span>
<span class="fa fa-fw fa-superpowers fa-lg"></span>
</a>
</li>
<li>
<a class="side-nav-menu" href="<@base />/socialsprovider/list/">
<@locale code="navs.socials.provider"/>
<span class="fa fa-fw fa-commenting fa-lg"></span>
</a>
</a>
</li>
</li>
...
...
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderAdd.ftl
0 → 100644
浏览文件 @
4d3f1245
<!DOCTYPE HTML>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<
#include
"../
layout
/
header.ftl
"
/>
<
#include
"../
layout
/
common.cssjs.ftl
"
/>
<style
type=
"text/css"
>
.table
th
,
.table
td
{
padding
:
.2rem
;
vertical-align
:
middle
;
}
</style>
<script
type=
"text/javascript"
>
</script>
</head>
<body>
<form
id=
"actionForm"
method=
"post"
type=
"label"
autoclose=
"true"
action=
"<@base/>/socialsprovider/add"
class=
"needs-validation"
novalidate
>
<table
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
class=
"table table-bordered"
>
<tbody>
<tr
style=
"display:none"
>
<th><
@
locale
code=
"common.text.id"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"id"
name=
"id"
class=
"form-control"
title=
""
value=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.icon"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"title"
name=
"icon"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.provider"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"provider"
name=
"provider"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.providerName"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"providerName"
name=
"providerName"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.clientId"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"clientId"
name=
"clientId"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.clientSecret"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"clientSecret"
name=
"clientSecret"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.agentId"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"agentId"
name=
"agentId"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"common.text.sortindex"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"sortIndex"
name=
"sortIndex"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.hidden"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"hidden"
name=
"hidden"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"common.text.status"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"status"
name=
"status"
class=
"form-control"
title=
""
value=
""
required=
""
/>
</td>
</tr>
<tr>
<td
nowrap
colspan=
"2"
class=
"center"
>
<input
id=
"_method"
type=
"hidden"
name=
"_method"
value=
"post"
/>
<input
class=
"button btn btn-primary mr-3"
id=
"submitBtn"
type=
"submit"
value=
"<@locale code="
button.text.save
"
/>
">
<input
class=
"button btn btn-secondary mr-3"
id=
"closeBtn"
type=
"button"
value=
"<@locale code="
button.text.cancel
"
/>
">
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
\ No newline at end of file
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderList.ftl
0 → 100644
浏览文件 @
4d3f1245
<!DOCTYPE HTML>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<
#include
"../
layout
/
header.ftl
"
/>
<
#include
"../
layout
/
common.cssjs.ftl
"
/>
<script
type=
"text/javascript"
>
function
dynamicFormatter
(
value
,
row
,
index
){
return
value
==
'
0
'
?
'
<@locale code="common.text.no" />
'
:
'
<@locale code="common.text.yes" />
'
;
};
function
iconFormatter
(
value
,
row
,
index
){
return
"
<img height='30' border='0px' src='<@base/>/static/
"
+
value
+
"
'/>
"
;
};
</script>
</head>
<body>
<div
class=
"app header-default side-nav-dark"
>
<div
class=
"layout"
>
<div
class=
"header navbar"
>
<
#include
"../
layout
/
top.ftl
"
/>
</div>
<div
class=
"col-md-3 sidebar-nav side-nav"
>
<
#include
"../
layout
/
sidenav.ftl
"
/>
</div>
<div
class=
"page-container"
>
<div
class=
"main-content"
>
<div
class=
"container-fluid"
>
<div
class=
"breadcrumb-wrapper row"
>
<div
class=
"col-12 col-lg-3 col-md-6"
>
<h4
class=
"page-title"
><
@
locale
code=
"navs.socials.provider"
/></h4>
</div>
<div
class=
"col-12 col-lg-9 col-md-6"
>
<ol
class=
"breadcrumb float-right"
>
<li><a
href=
"<@base/>/main"
><
@
locale
code=
"navs.home"
/></a></li>
<li
class=
"active"
>
/
<
@
locale
code=
"navs.socials.provider"
/></li>
</ol>
</div>
</div>
</div>
<div
class=
"container-fluid"
>
<div
class=
"content-wrapper row"
>
<div
class=
"col-12 grid-margin"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<table
class=
"table table-bordered"
>
<tr>
<td
width=
"120px"
><
@
locale
code=
"socials.provider.providerName"
/>
:
</td>
<td
width=
"375px"
>
<form
id=
"basic_search_form"
>
<input
class=
"form-control"
type=
"text"
name=
"providerName"
style =
"width:150px;float:left;"
>
<input
class=
"button btn btn-primary mr-3"
id=
"searchBtn"
type=
"button"
size=
"50"
value=
"<@locale code="
button.text.search
"
/>
">
<!--<input class="button btn btn-secondary" id="advancedSearchExpandBtn" type="button" size="50" value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>" collapseValue="<@locale code="button.text.collapsesearch"/>">
-->
</form>
</td>
<td
colspan=
"2"
>
<div
id=
"tool_box_right"
>
<input
class=
"button btn btn-success mr-3"
id=
"addBtn"
type=
"button"
value=
"<@locale code="
button.text.add
"
/>
"
wurl="
<
@
base
/>
/socialsprovider/forwardAdd"
wwidth="700"
wheight="500"
target="window">
<input
class=
"button btn btn-info mr-3 "
id=
"modifyBtn"
type=
"button"
value=
"<@locale code="
button.text.edit
"
/>
"
wurl="
<
@
base
/>
/socialsprovider/forwardUpdate"
wwidth="700"
wheight="500"
target="window">
<input
class=
"button btn btn-danger mr-3 "
id=
"deleteBtn"
type=
"button"
value=
"<@locale code="
button.text.delete
"
/>
"
wurl="
<
@
base
/>
/socialsprovider/delete" />
</div>
</td>
</tr>
</table>
<div
id=
"advanced_search"
>
<form
id=
"advanced_search_form"
>
</form>
</div>
<table
data-url=
"<@base/>/socialsprovider/grid"
id=
"datagrid"
data-toggle=
"table"
data-classes=
"table table-bordered table-hover table-striped"
data-click-to-select=
"true"
data-pagination=
"true"
data-total-field=
"records"
data-page-list=
"[10, 25, 50, 100]"
data-search=
"false"
data-locale=
"zh-CN"
data-query-params=
"dataGridQueryParams"
data-query-params-type=
"pageSize"
data-side-pagination=
"server"
>
<thead>
<tr>
<th
data-checkbox=
"true"
></th>
<th
data-sortable=
"true"
data-field=
"id"
data-visible=
"false"
>
Id
</th>
<th
data-field=
"icon"
data-formatter=
"iconFormatter"
><
@
locale
code=
"socials.provider.icon"
/></th>
<th
data-field=
"provider"
><
@
locale
code=
"socials.provider.provider"
/></th>
<th
data-field=
"providerName"
><
@
locale
code=
"socials.provider.providerName"
/></th>
<th
data-field=
"sortIndex"
><
@
locale
code=
"common.text.sortindex"
/></th>
<th
data-field=
"status"
><
@
locale
code=
"common.text.status"
/></th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<footer
class=
"content-footer"
>
<
#include
"../
layout
/
footer.ftl
"
/>
</footer>
</div>
</div>
</div>
<div
id=
"preloader"
>
<div
class=
"loader"
id=
"loader-1"
></div>
</div>
</body>
</html>
\ No newline at end of file
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/socialsprovider/socialsProviderUpdate.ftl
0 → 100644
浏览文件 @
4d3f1245
<!DOCTYPE HTML>
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<
#include
"../
layout
/
header.ftl
"
/>
<
#include
"../
layout
/
common.cssjs.ftl
"
/>
<style
type=
"text/css"
>
.table
th
,
.table
td
{
padding
:
.2rem
;
vertical-align
:
middle
;
}
.ck-content
{
min-height
:
300px
;
}
</style>
<script
type=
"text/javascript"
>
</script>
</head>
<body>
<form
id=
"actionForm"
method=
"post"
type=
"label"
autoclose=
"true"
action=
"<@base/>/socialsprovider/update"
class=
"needs-validation"
novalidate
>
<table
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
class=
"table table-bordered"
>
<tbody>
<tr
style=
"display:none"
>
<th><
@
locale
code=
"common.text.id"
/>
:
</th>
<td
nowrap
>
<input
id=
"id"
type=
"text"
readonly
name=
"id"
class=
"form-control"
value=
"${model.id}"
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.icon"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"title"
name=
"icon"
class=
"form-control"
title=
""
value=
"${model.icon!}"
required=
""
style=
"width:80%;float:left;"
/><img
height=
'30'
border=
'0px'
src=
'<@base/>/static/${model.icon!}'
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.provider"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"provider"
name=
"provider"
class=
"form-control"
title=
""
value=
"${model.provider!}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.providerName"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"providerName"
name=
"providerName"
class=
"form-control"
title=
""
value=
"${model.providerName!}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.clientId"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"clientId"
name=
"clientId"
class=
"form-control"
title=
""
value=
"${model.clientId!}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.clientSecret"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"clientSecret"
name=
"clientSecret"
class=
"form-control"
title=
""
value=
"${model.clientSecret!}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.agentId"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"agentId"
name=
"agentId"
class=
"form-control"
title=
""
value=
"${model.agentId!}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"common.text.sortindex"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"sortIndex"
name=
"sortIndex"
class=
"form-control"
title=
""
value=
"${model.sortIndex!}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"socials.provider.hidden"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"hidden"
name=
"hidden"
class=
"form-control"
title=
""
value=
"${model.hidden!}"
required=
""
/>
</td>
</tr>
<tr>
<th><
@
locale
code=
"common.text.status"
/>
:
</th>
<td
nowrap
>
<input
type=
"text"
id=
"status"
name=
"status"
class=
"form-control"
title=
""
value=
"${model.status!}"
required=
""
/>
</td>
</tr>
<tr>
<td
nowrap
colspan=
"2"
class=
"center"
>
<input
id=
"_method"
type=
"hidden"
name=
"_method"
value=
"post"
/>
<input
class=
"button btn btn-primary mr-3"
id=
"submitBtn"
type=
"submit"
value=
"<@locale code="
button.text.save
"
/>
">
<input
class=
"button btn btn-secondary mr-3"
id=
"closeBtn"
type=
"button"
value=
"<@locale code="
button.text.cancel
"
/>
">
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录