Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
68dcbce7
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
9 个月 前同步成功
通知
75
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MaxKey
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
68dcbce7
编写于
8月 20, 2021
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v2.9.0GA & SQL data
上级
5d6eabe7
变更
44
展开全部
隐藏空白更改
内联
并排
Showing
44 changed file
with
182 addition
and
150 deletion
+182
-150
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/SocialSignOnEndpoint.java
...xkey/authn/support/socialsignon/SocialSignOnEndpoint.java
+3
-3
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/JdbcSocialsAssociateService.java
...ort/socialsignon/service/JdbcSocialsAssociateService.java
+12
-12
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialsAssociate.java
.../authn/support/socialsignon/service/SocialsAssociate.java
+12
-12
maxkey-core/src/main/java/org/maxkey/entity/Accounts.java
maxkey-core/src/main/java/org/maxkey/entity/Accounts.java
+8
-8
maxkey-core/src/main/java/org/maxkey/entity/ChangePassword.java
...-core/src/main/java/org/maxkey/entity/ChangePassword.java
+6
-6
maxkey-core/src/main/java/org/maxkey/entity/HistoryLogin.java
...ey-core/src/main/java/org/maxkey/entity/HistoryLogin.java
+7
-7
maxkey-core/src/main/java/org/maxkey/entity/HistoryLoginApps.java
...ore/src/main/java/org/maxkey/entity/HistoryLoginApps.java
+8
-8
maxkey-core/src/main/java/org/maxkey/entity/RoleMember.java
maxkey-core/src/main/java/org/maxkey/entity/RoleMember.java
+1
-1
maxkey-core/src/main/java/org/maxkey/persistence/db/LoginHistoryService.java
...n/java/org/maxkey/persistence/db/LoginHistoryService.java
+1
-1
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AccountsService.java
.../java/org/maxkey/persistence/service/AccountsService.java
+3
-3
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java
.../java/org/maxkey/persistence/service/UserInfoService.java
+1
-1
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/highgo/HistoryLoginAppsMapper.xml
.../persistence/mapper/xml/highgo/HistoryLoginAppsMapper.xml
+3
-3
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/highgo/HistoryLoginMapper.xml
...xkey/persistence/mapper/xml/highgo/HistoryLoginMapper.xml
+3
-3
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/HistoryLoginAppsMapper.xml
...y/persistence/mapper/xml/mysql/HistoryLoginAppsMapper.xml
+3
-3
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/HistoryLoginMapper.xml
...axkey/persistence/mapper/xml/mysql/HistoryLoginMapper.xml
+4
-4
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/postgresql/HistoryLoginAppsMapper.xml
...sistence/mapper/xml/postgresql/HistoryLoginAppsMapper.xml
+2
-2
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/postgresql/HistoryLoginMapper.xml
.../persistence/mapper/xml/postgresql/HistoryLoginMapper.xml
+3
-3
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/AuthorizeBaseEndpoint.java
...java/org/maxkey/authz/endpoint/AuthorizeBaseEndpoint.java
+1
-1
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/AuthorizeCredentialEndpoint.java
...rg/maxkey/authz/endpoint/AuthorizeCredentialEndpoint.java
+3
-3
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
...java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
+1
-1
maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java
...xkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java
+1
-1
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/OAuthDefaultUserInfoAdapter.java
...ovider/userinfo/endpoint/OAuthDefaultUserInfoAdapter.java
+1
-1
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/OpenIdConnectUserInfoEndpoint.java
...ider/userinfo/endpoint/OpenIdConnectUserInfoEndpoint.java
+3
-3
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/UserInfoEndpoint.java
...z/oauth2/provider/userinfo/endpoint/UserInfoEndpoint.java
+3
-3
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/adapter/TokenBasedDefaultAdapter.java
...uthz/token/endpoint/adapter/TokenBasedDefaultAdapter.java
+2
-2
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/adapter/TokenBasedSimpleAdapter.java
...authz/token/endpoint/adapter/TokenBasedSimpleAdapter.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/AppListController.java
...ain/java/org/maxkey/web/contorller/AppListController.java
+4
-4
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SocialSignOnListController.java
...org/maxkey/web/contorller/SocialSignOnListController.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/historys/contorller/HistoryLoginController.java
...axkey/web/historys/contorller/HistoryLoginController.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/historys/contorller/LoginSessionController.java
...axkey/web/historys/contorller/LoginSessionController.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/interceptor/HistoryLoginAppAdapter.java
...va/org/maxkey/web/interceptor/HistoryLoginAppAdapter.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/resources/application.properties
...xkey-web-maxkey/src/main/resources/application.properties
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/authorize/init_sso_credential.ftl
...sources/templates/views/authorize/init_sso_credential.ftl
+2
-2
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/historys/loginList.ftl
...src/main/resources/templates/views/historys/loginList.ftl
+3
-3
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/main/appUserConfig.ftl
...src/main/resources/templates/views/main/appUserConfig.ftl
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/appAccountsAdd.ftl
...ain/resources/templates/views/accounts/appAccountsAdd.ftl
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/formbased/appAdd.ftl
.../main/resources/templates/views/apps/formbased/appAdd.ftl
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/formbased/appUpdate.ftl
...in/resources/templates/views/apps/formbased/appUpdate.ftl
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/userPropertys.ftl
...src/main/resources/templates/views/apps/userPropertys.ftl
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/historys/loginAppsHistoryList.ftl
...sources/templates/views/historys/loginAppsHistoryList.ftl
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/userinfo/userinfoSelect.ftl
...ain/resources/templates/views/userinfo/userinfoSelect.ftl
+1
-1
settings.gradle
settings.gradle
+4
-0
sql/maxkey_v2.9.0.GA.sql
sql/maxkey_v2.9.0.GA.sql
+38
-19
sql/maxkey_v2.9.0.GA_data.sql
sql/maxkey_v2.9.0.GA_data.sql
+23
-14
未找到文件。
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/SocialSignOnEndpoint.java
浏览文件 @
68dcbce7
...
...
@@ -74,7 +74,7 @@ public class SocialSignOnEndpoint extends AbstractSocialSignOnEndpoint{
WebContext
.
setAttribute
(
SOCIALSIGNON_SESSION_REDIRECT_URI
,
request
.
getParameter
(
SOCIALSIGNON_REDIRECT_URI
));
SocialsAssociate
socialSignOnUser
=
new
SocialsAssociate
();
socialSignOnUser
.
setProvider
(
provider
);
socialSignOnUser
.
setU
i
d
(
WebContext
.
getUserInfo
().
getId
());
socialSignOnUser
.
setU
serI
d
(
WebContext
.
getUserInfo
().
getId
());
socialSignOnUser
.
setUsername
(
WebContext
.
getUserInfo
().
getUsername
());
_logger
.
debug
(
"Social Sign On unbind "
+
provider
+
" from user "
+
WebContext
.
getUserInfo
().
getUsername
());
...
...
@@ -119,7 +119,7 @@ public class SocialSignOnEndpoint extends AbstractSocialSignOnEndpoint{
_logger
.
debug
(
this
.
accountId
);
socialsAssociate
=
new
SocialsAssociate
();
socialsAssociate
.
setProvider
(
provider
);
socialsAssociate
.
setSocial
ui
d
(
this
.
accountId
);
socialsAssociate
.
setSocial
UserI
d
(
this
.
accountId
);
//for login
String
socialSignOnType
=
""
;
...
...
@@ -153,7 +153,7 @@ public class SocialSignOnEndpoint extends AbstractSocialSignOnEndpoint{
}
socialsAssociate
.
setSocialUserInfo
(
accountJsonString
);
socialsAssociate
.
setU
i
d
(
WebContext
.
getUserInfo
().
getId
());
socialsAssociate
.
setU
serI
d
(
WebContext
.
getUserInfo
().
getId
());
socialsAssociate
.
setUsername
(
WebContext
.
getUserInfo
().
getUsername
());
//socialsAssociate.setAccessToken(JsonUtils.object2Json(accessToken));
//socialsAssociate.setExAttribute(JsonUtils.object2Json(accessToken.getResponseObject()));
...
...
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/JdbcSocialsAssociateService.java
浏览文件 @
68dcbce7
...
...
@@ -31,15 +31,15 @@ import org.springframework.jdbc.core.RowMapper;
public
class
JdbcSocialsAssociateService
implements
SocialsAssociateService
{
private
static
final
Logger
_logger
=
LoggerFactory
.
getLogger
(
JdbcSocialsAssociateService
.
class
);
private
static
final
String
DEFAULT_DEFAULT_INSERT_STATEMENT
=
"insert into mxk_socials_associate(id, u
id , username , provider , socialu
id , accesstoken , socialuserinfo , exattribute )values( ? , ? , ? , ? , ?, ? , ? , ?)"
;
private
static
final
String
DEFAULT_DEFAULT_INSERT_STATEMENT
=
"insert into mxk_socials_associate(id, u
serid , username , provider , socialuser
id , accesstoken , socialuserinfo , exattribute )values( ? , ? , ? , ? , ?, ? , ? , ?)"
;
private
static
final
String
DEFAULT_DEFAULT_INSERT_STATEMENT_ORACLE
=
"insert into mxk_socials_associate(id, u
id , username , provider , socialu
id , accesstoken , socialuserinfo , exattribute )values( ? , ? , ? , ? , ?, ? , ? , ?)"
;
private
static
final
String
DEFAULT_DEFAULT_INSERT_STATEMENT_ORACLE
=
"insert into mxk_socials_associate(id, u
serid , username , provider , socialuser
id , accesstoken , socialuserinfo , exattribute )values( ? , ? , ? , ? , ?, ? , ? , ?)"
;
private
static
final
String
DEFAULT_DEFAULT_SIGNON_SELECT_STATEMENT
=
"select id, u
id , username , provider , socialuid , accesstoken , socialuserinfo , exattribute , createddate , updateddate from mxk_socials_associate where provider = ? and socialu
id = ?"
;
private
static
final
String
DEFAULT_DEFAULT_SIGNON_SELECT_STATEMENT
=
"select id, u
serid , username , provider , socialuserid , accesstoken , socialuserinfo , exattribute , createddate , updateddate from mxk_socials_associate where provider = ? and socialuser
id = ?"
;
private
static
final
String
DEFAULT_DEFAULT_BIND_SELECT_STATEMENT
=
"select id, u
id , username , provider , socialuid , accesstoken , socialuserinfo , exattribute , createddate , updateddate from mxk_socials_associate where u
id = ?"
;
private
static
final
String
DEFAULT_DEFAULT_BIND_SELECT_STATEMENT
=
"select id, u
serid , username , provider , socialuserid , accesstoken , socialuserinfo , exattribute , createddate , updateddate from mxk_socials_associate where user
id = ?"
;
private
static
final
String
DEFAULT_DEFAULT_DELETE_STATEMENT
=
"delete from mxk_socials_associate where uid = ? and provider = ?"
;
private
static
final
String
DEFAULT_DEFAULT_DELETE_STATEMENT
=
"delete from mxk_socials_associate where u
ser
id = ? and provider = ?"
;
private
static
final
String
DEFAULT_DEFAULT_UPDATE_STATEMENT
=
"update mxk_socials_associate set accesstoken = ? , socialuserinfo = ? , exattribute = ? ,updateddate = ? where id = ?"
;
...
...
@@ -63,10 +63,10 @@ public class JdbcSocialsAssociateService implements SocialsAssociateService{
jdbcTemplate
.
update
(
"Oracle"
.
equals
(
jdbcType
)?
DEFAULT_DEFAULT_INSERT_STATEMENT_ORACLE:
DEFAULT_DEFAULT_INSERT_STATEMENT
,
new
Object
[]
{
socialsAssociate
.
getId
(),
socialsAssociate
.
getU
i
d
(),
socialsAssociate
.
getU
serI
d
(),
socialsAssociate
.
getUsername
(),
socialsAssociate
.
getProvider
(),
socialsAssociate
.
getSocial
ui
d
(),
socialsAssociate
.
getSocial
UserI
d
(),
socialsAssociate
.
getAccessToken
(),
socialsAssociate
.
getSocialUserInfo
(),
socialsAssociate
.
getExAttribute
()},
...
...
@@ -78,7 +78,7 @@ public class JdbcSocialsAssociateService implements SocialsAssociateService{
public
boolean
delete
(
SocialsAssociate
socialsAssociate
)
{
jdbcTemplate
.
update
(
DEFAULT_DEFAULT_DELETE_STATEMENT
,
new
Object
[]
{
socialsAssociate
.
getU
i
d
(),
socialsAssociate
.
getU
serI
d
(),
socialsAssociate
.
getProvider
()
},
new
int
[]
{
Types
.
VARCHAR
,
Types
.
VARCHAR
});
...
...
@@ -91,7 +91,7 @@ public class JdbcSocialsAssociateService implements SocialsAssociateService{
DEFAULT_DEFAULT_SIGNON_SELECT_STATEMENT
,
new
SocialsAssociateRowMapper
(),
socialsAssociate
.
getProvider
(),
socialsAssociate
.
getSocial
ui
d
());
socialsAssociate
.
getSocial
UserI
d
());
_logger
.
debug
(
"list socialsAssociate "
+
listsocialsAssociate
);
return
(
listsocialsAssociate
.
size
()>
0
)?
listsocialsAssociate
.
get
(
0
):
null
;
}
...
...
@@ -102,7 +102,7 @@ public class JdbcSocialsAssociateService implements SocialsAssociateService{
List
<
SocialsAssociate
>
listsocialsAssociate
=
jdbcTemplate
.
query
(
DEFAULT_DEFAULT_BIND_SELECT_STATEMENT
,
new
SocialsAssociateRowMapper
(),
socialsAssociate
.
getU
i
d
());
socialsAssociate
.
getU
serI
d
());
_logger
.
debug
(
"query bind SocialSignOnUser "
+
listsocialsAssociate
);
return
listsocialsAssociate
;
}
...
...
@@ -122,10 +122,10 @@ public class JdbcSocialsAssociateService implements SocialsAssociateService{
throws
SQLException
{
SocialsAssociate
socialsAssociate
=
new
SocialsAssociate
();
socialsAssociate
.
setId
(
rs
.
getString
(
1
));
socialsAssociate
.
setU
i
d
(
rs
.
getString
(
2
));
socialsAssociate
.
setU
serI
d
(
rs
.
getString
(
2
));
socialsAssociate
.
setUsername
(
rs
.
getString
(
3
));
socialsAssociate
.
setProvider
(
rs
.
getString
(
4
));
socialsAssociate
.
setSocial
ui
d
(
rs
.
getString
(
5
));
socialsAssociate
.
setSocial
UserI
d
(
rs
.
getString
(
5
));
socialsAssociate
.
setAccessToken
(
rs
.
getString
(
6
));
socialsAssociate
.
setSocialUserInfo
(
rs
.
getString
(
7
));
socialsAssociate
.
setExAttribute
(
rs
.
getString
(
8
));
...
...
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/service/SocialsAssociate.java
浏览文件 @
68dcbce7
...
...
@@ -31,9 +31,9 @@ public class SocialsAssociate extends JpaBaseEntity {
private
static
final
long
serialVersionUID
=
2151179554190800162L
;
private
String
id
;
private
String
provider
;
private
String
u
i
d
;
private
String
u
serI
d
;
private
String
username
;
private
String
social
ui
d
;
private
String
social
UserI
d
;
private
String
socialUserInfo
;
private
String
accessToken
;
private
String
exAttribute
;
...
...
@@ -64,16 +64,16 @@ public class SocialsAssociate extends JpaBaseEntity {
this
.
provider
=
provider
;
}
public
String
getU
i
d
()
{
return
u
i
d
;
public
String
getU
serI
d
()
{
return
u
serI
d
;
}
public
void
setU
i
d
(
String
uid
)
{
this
.
u
i
d
=
uid
;
public
void
setU
serI
d
(
String
uid
)
{
this
.
u
serI
d
=
uid
;
}
public
String
getSocial
ui
d
()
{
return
social
ui
d
;
public
String
getSocial
UserI
d
()
{
return
social
UserI
d
;
}
public
String
getUsername
()
{
...
...
@@ -84,8 +84,8 @@ public class SocialsAssociate extends JpaBaseEntity {
this
.
username
=
username
;
}
public
void
setSocial
uid
(
String
socialui
d
)
{
this
.
social
uid
=
socialui
d
;
public
void
setSocial
UserId
(
String
socialUserI
d
)
{
this
.
social
UserId
=
socialUserI
d
;
}
public
String
getSocialUserInfo
()
{
...
...
@@ -136,11 +136,11 @@ public class SocialsAssociate extends JpaBaseEntity {
builder
.
append
(
", provider="
);
builder
.
append
(
provider
);
builder
.
append
(
", uid="
);
builder
.
append
(
u
i
d
);
builder
.
append
(
u
serI
d
);
builder
.
append
(
", username="
);
builder
.
append
(
username
);
builder
.
append
(
", socialuid="
);
builder
.
append
(
social
ui
d
);
builder
.
append
(
social
UserI
d
);
builder
.
append
(
", socialUserInfo="
);
builder
.
append
(
socialUserInfo
);
builder
.
append
(
", accessToken="
);
...
...
maxkey-core/src/main/java/org/maxkey/entity/Accounts.java
浏览文件 @
68dcbce7
...
...
@@ -45,7 +45,7 @@ public class Accounts extends JpaBaseEntity implements Serializable {
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
,
generator
=
"snowflakeid"
)
private
String
id
;
@Column
private
String
u
i
d
;
private
String
u
serI
d
;
@Column
private
String
username
;
@Column
...
...
@@ -72,22 +72,22 @@ public class Accounts extends JpaBaseEntity implements Serializable {
}
public
Accounts
(
String
uid
,
String
appId
)
{
this
.
u
i
d
=
uid
;
this
.
u
serI
d
=
uid
;
this
.
appId
=
appId
;
}
public
Accounts
(
String
uid
,
String
appId
,
String
password
)
{
this
.
u
i
d
=
uid
;
this
.
u
serI
d
=
uid
;
this
.
appId
=
appId
;
this
.
relatedPassword
=
password
;
}
public
String
getU
i
d
()
{
return
u
i
d
;
public
String
getU
serI
d
()
{
return
u
serI
d
;
}
public
void
setU
i
d
(
String
uid
)
{
this
.
u
i
d
=
uid
;
public
void
setU
serI
d
(
String
uid
)
{
this
.
u
serI
d
=
uid
;
}
public
String
getUsername
()
{
...
...
@@ -158,7 +158,7 @@ public class Accounts extends JpaBaseEntity implements Serializable {
@Override
public
String
toString
()
{
return
"AppAccounts [uid="
+
u
i
d
+
", username="
+
username
+
", displayName="
+
displayName
+
", appId="
return
"AppAccounts [uid="
+
u
serI
d
+
", username="
+
username
+
", displayName="
+
displayName
+
", appId="
+
appId
+
", appName="
+
appName
+
", relatedUsername="
+
relatedUsername
+
", relatedPassword="
+
relatedPassword
+
"]"
;
}
...
...
maxkey-core/src/main/java/org/maxkey/entity/ChangePassword.java
浏览文件 @
68dcbce7
...
...
@@ -27,7 +27,7 @@ public class ChangePassword extends JpaBaseEntity{
private
static
final
long
serialVersionUID
=
-
2362608803392892403L
;
private
String
id
;
private
String
u
i
d
;
private
String
u
serI
d
;
private
String
username
;
private
String
email
;
private
String
mobile
;
...
...
@@ -66,16 +66,16 @@ public class ChangePassword extends JpaBaseEntity{
/**
* @return the uid
*/
public
String
getU
i
d
()
{
return
u
i
d
;
public
String
getU
serI
d
()
{
return
u
serI
d
;
}
/**
* @param uid the uid to set
*/
public
void
setU
i
d
(
String
uid
)
{
this
.
u
i
d
=
uid
;
public
void
setU
serI
d
(
String
uid
)
{
this
.
u
serI
d
=
uid
;
}
...
...
@@ -215,7 +215,7 @@ public class ChangePassword extends JpaBaseEntity{
builder
.
append
(
"ChangePassword [id="
);
builder
.
append
(
id
);
builder
.
append
(
", uid="
);
builder
.
append
(
u
i
d
);
builder
.
append
(
u
serI
d
);
builder
.
append
(
", username="
);
builder
.
append
(
username
);
builder
.
append
(
", displayName="
);
...
...
maxkey-core/src/main/java/org/maxkey/entity/HistoryLogin.java
浏览文件 @
68dcbce7
...
...
@@ -48,7 +48,7 @@ public class HistoryLogin extends JpaBaseEntity implements Serializable{
@Column
String
sessionId
;
@Column
String
u
i
d
;
String
u
serI
d
;
@Column
String
username
;
@Column
...
...
@@ -99,12 +99,12 @@ public class HistoryLogin extends JpaBaseEntity implements Serializable{
this
.
sessionId
=
sessionId
;
}
public
String
getU
i
d
()
{
return
u
i
d
;
public
String
getU
serI
d
()
{
return
u
serI
d
;
}
public
void
setU
id
(
String
ui
d
)
{
this
.
u
id
=
ui
d
;
public
void
setU
serId
(
String
userI
d
)
{
this
.
u
serId
=
userI
d
;
}
public
String
getUsername
()
{
...
...
@@ -234,8 +234,8 @@ public class HistoryLogin extends JpaBaseEntity implements Serializable{
builder
.
append
(
id
);
builder
.
append
(
", sessionId="
);
builder
.
append
(
sessionId
);
builder
.
append
(
", u
i
d="
);
builder
.
append
(
u
i
d
);
builder
.
append
(
", u
serI
d="
);
builder
.
append
(
u
serI
d
);
builder
.
append
(
", username="
);
builder
.
append
(
username
);
builder
.
append
(
", displayName="
);
...
...
maxkey-core/src/main/java/org/maxkey/entity/HistoryLoginApps.java
浏览文件 @
68dcbce7
...
...
@@ -46,7 +46,7 @@ public class HistoryLoginApps extends JpaBaseEntity {
@Column
private
String
appName
;
@Column
private
String
u
i
d
;
private
String
u
serI
d
;
@Column
private
String
username
;
@Column
...
...
@@ -144,18 +144,18 @@ public class HistoryLoginApps extends JpaBaseEntity {
/**
* @return the u
i
d
* @return the u
serI
d
*/
public
String
getU
i
d
()
{
return
u
i
d
;
public
String
getU
serI
d
()
{
return
u
serI
d
;
}
/**
* @param uid the uid to set
*/
public
void
setU
i
d
(
String
uid
)
{
this
.
u
i
d
=
uid
;
public
void
setU
serI
d
(
String
uid
)
{
this
.
u
serI
d
=
uid
;
}
...
...
@@ -222,8 +222,8 @@ public class HistoryLoginApps extends JpaBaseEntity {
builder
.
append
(
appId
);
builder
.
append
(
", appName="
);
builder
.
append
(
appName
);
builder
.
append
(
", u
i
d="
);
builder
.
append
(
u
i
d
);
builder
.
append
(
", u
serI
d="
);
builder
.
append
(
u
serI
d
);
builder
.
append
(
", username="
);
builder
.
append
(
username
);
builder
.
append
(
", displayName="
);
...
...
maxkey-core/src/main/java/org/maxkey/entity/RoleMember.java
浏览文件 @
68dcbce7
...
...
@@ -28,7 +28,7 @@ import javax.persistence.Table;
/*
ID varchar(40) not null,
APPROLEID varchar(40) null,
UID varchar(40) null
U
SER
ID varchar(40) null
constraint PK_ROLES primary key clustered (ID)
*/
@Entity
...
...
maxkey-core/src/main/java/org/maxkey/persistence/db/LoginHistoryService.java
浏览文件 @
68dcbce7
...
...
@@ -28,7 +28,7 @@ import org.springframework.jdbc.core.JdbcTemplate;
public
class
LoginHistoryService
{
private
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
LoginHistoryService
.
class
);
private
static
final
String
HISTORY_LOGIN_INSERT_STATEMENT
=
"insert into mxk_history_login (id , sessionid , uid , username , displayname , logintype , message , code , provider , sourceip , browser , platform , application , loginurl , sessionstatus)values( ? , ? , ? , ? , ? , ?, ? , ? , ?, ? , ? , ?, ? , ? , ?)"
;
private
static
final
String
HISTORY_LOGIN_INSERT_STATEMENT
=
"insert into mxk_history_login (id , sessionid , u
ser
id , username , displayname , logintype , message , code , provider , sourceip , browser , platform , application , loginurl , sessionstatus)values( ? , ? , ? , ? , ? , ?, ? , ? , ?, ? , ? , ?, ? , ? , ?)"
;
private
static
final
String
HISTORY_LOGOUT_UPDATE_STATEMENT
=
"update mxk_history_login set logouttime = ? ,sessionstatus = 7 where sessionid = ?"
;
...
...
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AccountsService.java
浏览文件 @
68dcbce7
...
...
@@ -53,7 +53,7 @@ public class AccountsService extends JpaBaseService<Accounts>{
public
boolean
insert
(
Accounts
account
)
{
if
(
super
.
insert
(
account
))
{
if
(
kafkaPersistService
.
getApplicationConfig
().
isKafkaSupport
())
{
UserInfo
loadUserInfo
=
userInfoService
.
loadUserRelated
(
account
.
getU
i
d
());
UserInfo
loadUserInfo
=
userInfoService
.
loadUserRelated
(
account
.
getU
serI
d
());
account
.
setUserInfo
(
loadUserInfo
);
kafkaPersistService
.
send
(
KafkaIdentityTopic
.
ACCOUNT_TOPIC
,
...
...
@@ -69,7 +69,7 @@ public class AccountsService extends JpaBaseService<Accounts>{
public
boolean
update
(
Accounts
account
)
{
if
(
super
.
update
(
account
))
{
if
(
kafkaPersistService
.
getApplicationConfig
().
isKafkaSupport
())
{
UserInfo
loadUserInfo
=
userInfoService
.
loadUserRelated
(
account
.
getU
i
d
());
UserInfo
loadUserInfo
=
userInfoService
.
loadUserRelated
(
account
.
getU
serI
d
());
account
.
setUserInfo
(
loadUserInfo
);
kafkaPersistService
.
send
(
KafkaIdentityTopic
.
ACCOUNT_TOPIC
,
...
...
@@ -87,7 +87,7 @@ public class AccountsService extends JpaBaseService<Accounts>{
if
(
super
.
remove
(
id
))
{
UserInfo
loadUserInfo
=
null
;
if
(
kafkaPersistService
.
getApplicationConfig
().
isKafkaSupport
())
{
loadUserInfo
=
userInfoService
.
loadUserRelated
(
account
.
getU
i
d
());
loadUserInfo
=
userInfoService
.
loadUserRelated
(
account
.
getU
serI
d
());
account
.
setUserInfo
(
loadUserInfo
);
kafkaPersistService
.
send
(
KafkaIdentityTopic
.
ACCOUNT_TOPIC
,
...
...
maxkey-persistence/src/main/java/org/maxkey/persistence/service/UserInfoService.java
浏览文件 @
68dcbce7
...
...
@@ -297,7 +297,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
if
(
userInfo
.
getPassword
()!=
null
&&
!
userInfo
.
getPassword
().
equals
(
""
))
{
ChangePassword
changePassword
=
new
ChangePassword
();
changePassword
.
setId
(
userInfo
.
getId
());
changePassword
.
setU
i
d
(
userInfo
.
getId
());
changePassword
.
setU
serI
d
(
userInfo
.
getId
());
changePassword
.
setUsername
(
userInfo
.
getUsername
());
changePassword
.
setDecipherable
(
userInfo
.
getDecipherable
());
changePassword
.
setPassword
(
userInfo
.
getPassword
());
...
...
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/highgo/HistoryLoginAppsMapper.xml
浏览文件 @
68dcbce7
...
...
@@ -15,8 +15,8 @@
<if
test=
"appName != null and appName != ''"
>
and appname like concat('%',#{appName},'%')
</if>
<if
test=
"u
id != null and ui
d != ''"
>
and u
id = #{ui
d}
<if
test=
"u
serId != null and userI
d != ''"
>
and u
serId = #{userI
d}
</if>
<if
test=
"username != null and username != ''"
>
and username like concat('%',#{username},'%')
...
...
@@ -39,7 +39,7 @@
sessionid,
appid,
appname,
u
i
d,
u
serI
d,
username,
displayname,
to_char(logintime,'YYYY-MM-DD HH24:MI:SS') as logintime
...
...
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/highgo/HistoryLoginMapper.xml
浏览文件 @
68dcbce7
...
...
@@ -6,8 +6,8 @@
<if
test=
"id != null and id != ''"
>
and id = #{id}
</if>
<if
test=
"u
id != null and ui
d != ''"
>
and u
id = #{ui
d}
<if
test=
"u
serId != null and userI
d != ''"
>
and u
serId = #{userI
d}
</if>
<if
test=
"username != null and username != '' "
>
and lower(username) like lower(concat('%',#{username},'%'))
...
...
@@ -42,7 +42,7 @@
select
id,
sessionid,
u
i
d,
u
serI
d,
username,
displayname,
logintype,
...
...
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/HistoryLoginAppsMapper.xml
浏览文件 @
68dcbce7
...
...
@@ -15,8 +15,8 @@
<if
test=
"appName != null and appName != ''"
>
and appname like concat('%',#{appName},'%')
</if>
<if
test=
"u
id != null and ui
d != ''"
>
and u
id = #{ui
d}
<if
test=
"u
serId != null and userI
d != ''"
>
and u
serId = #{userI
d}
</if>
<if
test=
"username != null and username != ''"
>
and username = #{username}
...
...
@@ -39,7 +39,7 @@
sessionid,
appid,
appname,
u
i
d,
u
serI
d,
username,
displayname,
date_format(logintime, '%Y-%m-%d %H:%i:%s') as logintime
...
...
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/HistoryLoginMapper.xml
浏览文件 @
68dcbce7
...
...
@@ -6,8 +6,8 @@
<if
test=
"id != null and id != ''"
>
and id = #{id}
</if>
<if
test=
"u
id != null and ui
d != ''"
>
and u
id = #{ui
d}
<if
test=
"u
serId != null and userI
d != ''"
>
and u
serId = #{userI
d}
</if>
<if
test=
"username != null and username != '' "
>
and lower(username) like lower(concat('%',#{username},'%'))
...
...
@@ -42,7 +42,7 @@
select
id,
sessionid,
u
i
d,
u
serI
d,
username,
displayname,
logintype,
...
...
@@ -68,7 +68,7 @@
select
sessionid id,
sessionid,
u
i
d,
u
serI
d,
username,
displayname,
logintype,
...
...
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/postgresql/HistoryLoginAppsMapper.xml
浏览文件 @
68dcbce7
...
...
@@ -15,8 +15,8 @@
<if
test=
"appName != null and appName != ''"
>
and appname like concat('%',#{appName},'%')
</if>
<if
test=
"u
id != null and ui
d != ''"
>
and u
id = #{ui
d}
<if
test=
"u
serId != null and userI
d != ''"
>
and u
serId = #{userI
d}
</if>
<if
test=
"username != null and username != ''"
>
and username like concat('%',#{username},'%')
...
...
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/postgresql/HistoryLoginMapper.xml
浏览文件 @
68dcbce7
...
...
@@ -6,8 +6,8 @@
<if
test=
"id != null and id != ''"
>
and id = #{id}
</if>
<if
test=
"u
id != null and ui
d != ''"
>
and u
id = #{ui
d}
<if
test=
"u
serId != null and userI
d != ''"
>
and u
serId = #{userI
d}
</if>
<if
test=
"username != null and username != '' "
>
and lower(username) like lower(concat('%',#{username},'%'))
...
...
@@ -42,7 +42,7 @@
select
id,
sessionid,
u
i
d,
u
serI
d,
username,
displayname,
logintype,
...
...
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/AuthorizeBaseEndpoint.java
浏览文件 @
68dcbce7
...
...
@@ -89,7 +89,7 @@ public class AuthorizeBaseEndpoint {
}
else
if
(
application
.
getCredential
()==
Apps
.
CREDENTIALS
.
SYSTEM
){
if
(
application
.
getSystemUserAttr
().
equalsIgnoreCase
(
"u
i
d"
)){
if
(
application
.
getSystemUserAttr
().
equalsIgnoreCase
(
"u
serI
d"
)){
account
.
setUsername
(
userInfo
.
getId
());
}
else
if
(
application
.
getSystemUserAttr
().
equalsIgnoreCase
(
"username"
)){
account
.
setUsername
(
userInfo
.
getUsername
());
...
...
maxkey-protocols/maxkey-protocol-authorize/src/main/java/org/maxkey/authz/endpoint/AuthorizeCredentialEndpoint.java
浏览文件 @
68dcbce7
...
...
@@ -47,7 +47,7 @@ public class AuthorizeCredentialEndpoint extends AuthorizeBaseEndpoint{
modelAndView
.
addObject
(
"username"
,
""
);
modelAndView
.
addObject
(
"password"
,
""
);
modelAndView
.
addObject
(
"setpassword"
,
true
);
modelAndView
.
addObject
(
"u
i
d"
,
WebContext
.
getUserInfo
().
getId
());
modelAndView
.
addObject
(
"u
serI
d"
,
WebContext
.
getUserInfo
().
getId
());
modelAndView
.
addObject
(
"appId"
,
appId
);
modelAndView
.
addObject
(
"appName"
,
getApp
(
appId
).
getName
());
modelAndView
.
addObject
(
"redirect_uri"
,
redirect_uri
);
...
...
@@ -57,7 +57,7 @@ public class AuthorizeCredentialEndpoint extends AuthorizeBaseEndpoint{
@RequestMapping
(
"/authz/credential"
)
public
ModelAndView
authorizeCredential
(
HttpServletRequest
request
,
@RequestParam
(
"u
id"
)
String
ui
d
,
@RequestParam
(
"u
serId"
)
String
userI
d
,
@RequestParam
(
"appId"
)
String
appId
,
@RequestParam
(
"identity_username"
)
String
identity_username
,
@RequestParam
(
"identity_password"
)
String
identity_password
,
...
...
@@ -68,7 +68,7 @@ public class AuthorizeCredentialEndpoint extends AuthorizeBaseEndpoint{
UserInfo
userInfo
=
WebContext
.
getUserInfo
();
appUser
.
setId
(
appUser
.
generateId
());
appUser
.
setU
i
d
(
userInfo
.
getId
());
appUser
.
setU
serI
d
(
userInfo
.
getId
());
appUser
.
setUsername
(
userInfo
.
getUsername
());
appUser
.
setDisplayName
(
userInfo
.
getDisplayName
());
...
...
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
浏览文件 @
68dcbce7
...
...
@@ -200,7 +200,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
ServiceResponseBuilder
serviceResponseBuilder
=
new
ServiceResponseBuilder
();
serviceResponseBuilder
.
setFormat
(
HttpResponseConstants
.
FORMAT_TYPE
.
JSON
);
//for user
serviceResponseBuilder
.
setAttribute
(
"u
i
d"
,
userInfo
.
getId
());
serviceResponseBuilder
.
setAttribute
(
"u
serI
d"
,
userInfo
.
getId
());
serviceResponseBuilder
.
setAttribute
(
"displayName"
,
userInfo
.
getDisplayName
());
serviceResponseBuilder
.
setAttribute
(
"firstName"
,
userInfo
.
getGivenName
());
serviceResponseBuilder
.
setAttribute
(
"lastname"
,
userInfo
.
getFamilyName
());
...
...
maxkey-protocols/maxkey-protocol-extendapi/src/main/java/org/maxkey/authz/exapi/endpoint/ExtendApiAuthorizeEndpoint.java
浏览文件 @
68dcbce7
...
...
@@ -63,7 +63,7 @@ public class ExtendApiAuthorizeEndpoint extends AuthorizeBaseEndpoint{
String
username
=
""
;
String
password
=
""
;
if
(
apps
.
getCredential
()==
1
)
{
if
(
apps
.
getSystemUserAttr
().
equalsIgnoreCase
(
"u
i
d"
))
{
if
(
apps
.
getSystemUserAttr
().
equalsIgnoreCase
(
"u
serI
d"
))
{
username
=
userInfo
.
getId
();
}
else
if
(
apps
.
getSystemUserAttr
().
equalsIgnoreCase
(
"username"
))
{
username
=
userInfo
.
getUsername
();
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/OAuthDefaultUserInfoAdapter.java
浏览文件 @
68dcbce7
...
...
@@ -33,7 +33,7 @@ public class OAuthDefaultUserInfoAdapter extends AbstractAuthorizeAdapter {
public
String
generateInfo
(
SigninPrincipal
authentication
,
UserInfo
userInfo
,
Object
app
)
{
HashMap
<
String
,
Object
>
beanMap
=
new
HashMap
<
String
,
Object
>();
beanMap
.
put
(
"randomId"
,(
new
StringGenerator
()).
uuidGenerate
());
beanMap
.
put
(
"u
i
d"
,
userInfo
.
getId
());
beanMap
.
put
(
"u
serI
d"
,
userInfo
.
getId
());
//for spring security oauth2
beanMap
.
put
(
"user"
,
userInfo
.
getUsername
());
beanMap
.
put
(
"username"
,
userInfo
.
getUsername
());
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/OpenIdConnectUserInfoEndpoint.java
浏览文件 @
68dcbce7
...
...
@@ -271,9 +271,9 @@ public class OpenIdConnectUserInfoEndpoint {
return
atfe
;
}
public
UserInfo
queryUserInfo
(
String
u
i
d
){
_logger
.
debug
(
"u
id : "
+
ui
d
);
UserInfo
userInfo
=
(
UserInfo
)
userInfoService
.
loadByUsername
(
u
i
d
);
public
UserInfo
queryUserInfo
(
String
u
serI
d
){
_logger
.
debug
(
"u
serId : "
+
userI
d
);
UserInfo
userInfo
=
(
UserInfo
)
userInfoService
.
loadByUsername
(
u
serI
d
);
return
userInfo
;
}
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/userinfo/endpoint/UserInfoEndpoint.java
浏览文件 @
68dcbce7
...
...
@@ -157,9 +157,9 @@ public class UserInfoEndpoint {
return
atfe
;
}
public
UserInfo
queryUserInfo
(
String
u
i
d
){
_logger
.
debug
(
"u
id : "
+
ui
d
);
UserInfo
userInfo
=
(
UserInfo
)
userInfoService
.
loadByUsername
(
u
i
d
);
public
UserInfo
queryUserInfo
(
String
u
serI
d
){
_logger
.
debug
(
"u
serId : "
+
userI
d
);
UserInfo
userInfo
=
(
UserInfo
)
userInfoService
.
loadByUsername
(
u
serI
d
);
return
userInfo
;
}
...
...
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/adapter/TokenBasedDefaultAdapter.java
浏览文件 @
68dcbce7
...
...
@@ -42,8 +42,8 @@ public class TokenBasedDefaultAdapter extends AbstractAuthorizeAdapter {
beanMap
.
put
(
"randomId"
,(
new
StringGenerator
()).
uuidGenerate
());
if
(
details
.
getUserPropertys
()!=
null
&&
!
details
.
getUserPropertys
().
equals
(
""
))
{
if
(
details
.
getUserPropertys
().
indexOf
(
"u
i
d"
)>-
1
){
beanMap
.
put
(
"u
i
d"
,
userInfo
.
getId
());
if
(
details
.
getUserPropertys
().
indexOf
(
"u
serI
d"
)>-
1
){
beanMap
.
put
(
"u
serI
d"
,
userInfo
.
getId
());
}
if
(
details
.
getUserPropertys
().
indexOf
(
"username"
)>-
1
){
...
...
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/adapter/TokenBasedSimpleAdapter.java
浏览文件 @
68dcbce7
...
...
@@ -37,7 +37,7 @@ public class TokenBasedSimpleAdapter extends AbstractAuthorizeAdapter {
String
tokenUsername
=
userInfo
.
getUsername
();
if
(
details
.
getUserPropertys
()!=
null
&&
!
details
.
getUserPropertys
().
equals
(
""
))
{
if
(
details
.
getUserPropertys
().
indexOf
(
"u
i
d"
)>-
1
){
if
(
details
.
getUserPropertys
().
indexOf
(
"u
serI
d"
)>-
1
){
tokenUsername
=
userInfo
.
getId
();
}
else
if
(
details
.
getUserPropertys
().
indexOf
(
"username"
)>-
1
){
tokenUsername
=
userInfo
.
getUsername
();
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/AppListController.java
浏览文件 @
68dcbce7
...
...
@@ -120,7 +120,7 @@ public class AppListController {
}
else
{
modelAndView
.
addObject
(
"protectedappId"
,
false
);
}
modelAndView
.
addObject
(
"u
i
d"
,
userInfo
.
getId
());
modelAndView
.
addObject
(
"u
serI
d"
,
userInfo
.
getId
());
modelAndView
.
addObject
(
"appId"
,
appId
);
modelAndView
.
addObject
(
"protocol"
,
protocol
);
modelAndView
.
addObject
(
"credential"
,
credential
);
...
...
@@ -223,7 +223,7 @@ public class AppListController {
modelAndView
.
addObject
(
"password"
,
false
);
}
modelAndView
.
addObject
(
"u
i
d"
,
userInfo
.
getId
());
modelAndView
.
addObject
(
"u
serI
d"
,
userInfo
.
getId
());
modelAndView
.
addObject
(
"appId"
,
appId
);
modelAndView
.
addObject
(
"protocol"
,
protocol
);
modelAndView
.
addObject
(
"credential"
,
credential
);
...
...
@@ -242,7 +242,7 @@ public class AppListController {
Accounts
appUsers
=
new
Accounts
();
appUsers
.
setAppId
(
appId
);
appUsers
.
setU
i
d
(
userInfo
.
getId
());
appUsers
.
setU
serI
d
(
userInfo
.
getId
());
if
(
identity_password
!=
null
&&
!
identity_password
.
equals
(
""
)
&&
credential
==
Apps
.
CREDENTIALS
.
USER_DEFINED
)
{
appUsers
=
appUsersService
.
load
(
new
Accounts
(
userInfo
.
getId
(),
appId
));
...
...
@@ -251,7 +251,7 @@ public class AppListController {
appUsers
.
setId
(
appUsers
.
generateId
());
appUsers
.
setAppId
(
appId
);
appUsers
.
setAppName
(
app
.
getName
());
appUsers
.
setU
i
d
(
userInfo
.
getId
());
appUsers
.
setU
serI
d
(
userInfo
.
getId
());
appUsers
.
setUsername
(
userInfo
.
getUsername
());
appUsers
.
setDisplayName
(
userInfo
.
getDisplayName
());
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SocialSignOnListController.java
浏览文件 @
68dcbce7
...
...
@@ -58,7 +58,7 @@ public class SocialSignOnListController {
List
<
SocialSignOnProvider
>
listSocialSignOnProvider
=
socialSignOnProviderService
.
getSocialSignOnProviders
();
SocialsAssociate
socialSignOnUser
=
new
SocialsAssociate
();
socialSignOnUser
.
setU
i
d
(
WebContext
.
getUserInfo
().
getId
());
socialSignOnUser
.
setU
serI
d
(
WebContext
.
getUserInfo
().
getId
());
List
<
SocialsAssociate
>
listSocialSignOnUserToken
=
socialSignOnUserService
.
query
(
socialSignOnUser
);
List
<
SocialSignOnProvider
>
listBindSocialSignOnProvider
=
new
ArrayList
<
SocialSignOnProvider
>();
_logger
.
debug
(
"list SocialSignOnProvider : "
+
listSocialSignOnProvider
);
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/historys/contorller/HistoryLoginController.java
浏览文件 @
68dcbce7
...
...
@@ -69,7 +69,7 @@ public class HistoryLoginController {
@ResponseBody
public
JpaPageResults
<
HistoryLogin
>
logAuthsGrid
(
@ModelAttribute
(
"historyLogin"
)
HistoryLogin
historyLogin
)
{
_logger
.
debug
(
"history/login/grid/ logsGrid() "
+
historyLogin
);
historyLogin
.
setU
i
d
(
WebContext
.
getUserInfo
().
getId
());
historyLogin
.
setU
serI
d
(
WebContext
.
getUserInfo
().
getId
());
return
historyLoginService
.
queryPageResults
(
historyLogin
);
}
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/historys/contorller/LoginSessionController.java
浏览文件 @
68dcbce7
...
...
@@ -89,7 +89,7 @@ public class LoginSessionController {
@ResponseBody
public
JpaPageResults
<
HistoryLogin
>
loginSessionListGrid
(
@ModelAttribute
(
"historyLogin"
)
HistoryLogin
historyLogin
)
{
_logger
.
debug
(
"history/loginsession/ loginSessionListGrid() "
+
historyLogin
);
historyLogin
.
setU
i
d
(
WebContext
.
getUserInfo
().
getId
());
historyLogin
.
setU
serI
d
(
WebContext
.
getUserInfo
().
getId
());
return
historyLoginService
.
queryOnlineSession
(
historyLogin
);
}
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/interceptor/HistoryLoginAppAdapter.java
浏览文件 @
68dcbce7
...
...
@@ -91,7 +91,7 @@ public class HistoryLoginAppAdapter implements AsyncHandlerInterceptor {
historyLoginApps
.
setAppId
(
app
.
getId
());
historyLoginApps
.
setSessionId
(
sessionId
);
historyLoginApps
.
setAppName
(
app
.
getName
());
historyLoginApps
.
setU
i
d
(
userInfo
.
getId
());
historyLoginApps
.
setU
serI
d
(
userInfo
.
getId
());
historyLoginApps
.
setUsername
(
userInfo
.
getUsername
());
historyLoginApps
.
setDisplayName
(
userInfo
.
getDisplayName
());
historyLoginAppsService
.
insert
(
historyLoginApps
);
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/application.properties
浏览文件 @
68dcbce7
...
...
@@ -22,5 +22,5 @@ application.formatted-version=v2.9.0 GA
############################################################################
#spring.profiles.active https/http; default https #
############################################################################
spring.profiles.active
=
http
spring.profiles.active
=
http
s
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/authorize/init_sso_credential.ftl
浏览文件 @
68dcbce7
...
...
@@ -22,8 +22,8 @@
<td><input
required=
""
class=
"form-control"
type=
"password"
id=
"identity_password"
name=
"identity_password"
value=
""
/></td>
</tr>
<tr
style=
"display:none"
>
<td>
u
i
d
</td>
<td><input
type=
"text"
id=
"u
id"
name=
"uid"
value=
"${ui
d}"
/></td>
<td>
u
serI
d
</td>
<td><input
type=
"text"
id=
"u
serId"
name=
"userId"
value=
"${userI
d}"
/></td>
</tr>
<tr
style=
"display:none"
>
<td>
appId
</td>
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/historys/loginList.ftl
浏览文件 @
68dcbce7
...
...
@@ -77,9 +77,9 @@
<th
data-field=
"logoutTime"
><
@
locale
code=
"log.loginhistory.logoutTime"
/></th>
<th
data-field=
"platform"
><
@
locale
code=
"log.loginhistory.platform"
/></th>
<th
data-field=
"application"
><
@
locale
code=
"log.loginhistory.application"
/></th>
<th
data-field=
"loginUrl"
><
@
locale
code=
"log.loginhistory.loginUrl"
/></th>
<th
data-field=
"code"
><
@
locale
code=
"log.loginhistory.code"
/></th>
<th
data-field=
"rpUserInfo"
><
@
locale
code=
"log.loginhistory.rpUserInfo"
/></th>
<th
data-field=
"loginUrl"
data-visible=
"false"
><
@
locale
code=
"log.loginhistory.loginUrl"
/></th>
<th
data-field=
"code"
data-visible=
"false"
><
@
locale
code=
"log.loginhistory.code"
/></th>
<th
data-field=
"rpUserInfo"
data-visible=
"false"
><
@
locale
code=
"log.loginhistory.rpUserInfo"
/></th>
</tr>
</thead>
...
...
maxkey-webs/maxkey-web-maxkey/src/main/resources/templates/views/main/appUserConfig.ftl
浏览文件 @
68dcbce7
...
...
@@ -32,7 +32,7 @@
<tr
style=
"display:none"
>
<td>
uid
</td>
<td><input
class=
"form-control"
type=
"text"
id=
"u
id"
name=
"uid"
value=
"${ui
d}"
/></td>
<td><input
class=
"form-control"
type=
"text"
id=
"u
serId"
name=
"userId"
value=
"${userI
d}"
/></td>
</tr>
<tr
style=
"display:none"
>
<td>
appId
</td>
...
...
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/accounts/appAccountsAdd.ftl
浏览文件 @
68dcbce7
...
...
@@ -71,7 +71,7 @@
<td
colspan=
"2"
class=
"center"
>
<input
id=
"_method"
type=
"hidden"
name=
"_method"
value=
"post"
/>
<input
id=
"status"
type=
"hidden"
name=
"status"
value=
"1"
/>
<input
type=
"hidden"
id=
"u
id"
name=
"uid"
class=
"uid"
title=
""
value=
"${model.ui
d!}"
/>
<input
type=
"hidden"
id=
"u
serId"
name=
"userId"
class=
"userId"
title=
""
value=
"${model.userI
d!}"
/>
<input
type=
"hidden"
id=
"appId"
name=
"appId"
class=
"appId"
title=
""
value=
"${model.appId!}"
/>
<input
class=
"button btn btn-primary mr-3"
type=
"submit"
id=
"submitBtn"
value=
"<@locale code="
button.text.save
"
/>
"/>
<input
class=
"button btn btn-secondary mr-3"
type=
"button"
id=
"closeBtn"
value=
"<@locale code="
button.text.cancel
"
/>
"/>
...
...
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/formbased/appAdd.ftl
浏览文件 @
68dcbce7
...
...
@@ -93,7 +93,7 @@ $(function(){
<th><
@
locale
code=
"apps.systemUserAttr"
/>
:
</th>
<td
colspan=
"3"
>
<select
id=
"systemUserAttr"
name=
"systemUserAttr"
class=
"form-control"
>
<option
value=
"u
i
d"
>
<option
value=
"u
serI
d"
>
<
@
locale
code=
"userinfo.id"
/></option>
<option
value=
"employeeNumber"
>
<
@
locale
code=
"userinfo.employeeNumber"
/></option>
...
...
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/formbased/appUpdate.ftl
浏览文件 @
68dcbce7
...
...
@@ -96,7 +96,7 @@ $(function(){
<th><
@
locale
code=
"apps.systemUserAttr"
/>
:
</th>
<td
colspan=
"3"
>
<select
id=
"systemUserAttr"
name=
"systemUserAttr"
class=
"form-control"
>
<option
value=
"u
id"
<
#if
'
ui
d
'==
model.systemUserAttr
>
selected
</
#
if>
>
<option
value=
"u
serId"
<
#if
'
userI
d
'==
model.systemUserAttr
>
selected
</
#
if>
>
<
@
locale
code=
"userinfo.id"
/></option>
<option
value=
"employeeNumber"
<
#if
'
employeeNumber
'==
model.systemUserAttr
>
selected
</
#
if>
>
<
@
locale
code=
"userinfo.employeeNumber"
/></option>
...
...
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/apps/userPropertys.ftl
浏览文件 @
68dcbce7
<select id="userPropertys" name="userPropertys" class="form-control multipleselect" multiple="multiple" >
<option value="u
id" <#if model.userPropertys?contains("ui
d")>selected</#if> >
<option value="u
serId" <#if model.userPropertys?contains("userI
d")>selected</#if> >
<@locale code="userinfo.id" />
</option>
<option value="username" <#if model.userPropertys?contains("username")>selected</#if> >
...
...
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/historys/loginAppsHistoryList.ftl
浏览文件 @
68dcbce7
...
...
@@ -110,7 +110,7 @@
<tr>
<th
data-sortable=
"true"
data-field=
"id"
data-visible=
"false"
><
@
locale
code=
"log.loginappshistory.id"
/></th>
<th
data-field=
"sessionId"
><
@
locale
code=
"log.loginappshistory.sessionId"
/></th>
<th
data-field=
"u
i
d"
data-visible=
"false"
><
@
locale
code=
"log.loginappshistory.uid"
/></th>
<th
data-field=
"u
serI
d"
data-visible=
"false"
><
@
locale
code=
"log.loginappshistory.uid"
/></th>
<th
data-field=
"username"
><
@
locale
code=
"log.loginappshistory.username"
/></th>
<th
data-field=
"displayName"
><
@
locale
code=
"log.loginappshistory.displayName"
/></th>
<th
data-field=
"appId"
data-visible=
"false"
><
@
locale
code=
"log.loginappshistory.appId"
/></th>
...
...
maxkey-webs/maxkey-web-mgt/src/main/resources/templates/views/userinfo/userinfoSelect.ftl
浏览文件 @
68dcbce7
...
...
@@ -32,7 +32,7 @@
console
.
log
(
seldata
[
0
].
id
+
"
-
"
+
seldata
[
0
].
fullName
);
$
(
"
.username
"
,
window
.
parent
.
document
).
val
(
seldata
[
0
].
username
);
$
(
"
.displayName
"
,
window
.
parent
.
document
).
val
(
seldata
[
0
].
displayName
);
$
(
"
.u
i
d
"
,
window
.
parent
.
document
).
val
(
seldata
[
0
].
id
);
$
(
"
.u
serI
d
"
,
window
.
parent
.
document
).
val
(
seldata
[
0
].
id
);
$
.
closeWindow
();
});
...
...
settings.gradle
浏览文件 @
68dcbce7
...
...
@@ -42,3 +42,7 @@ include 'maxkey-webs:maxkey-web-resources'
include
'maxkey-webs:maxkey-web-maxkey'
//maxkey-mgt management
include
'maxkey-webs:maxkey-web-mgt'
//maxkey-boot-monitor
include
'maxkey-webs:maxkey-boot-monitor'
include
'maxkey-gataway'
sql/maxkey_v2.9.0.GA.sql
浏览文件 @
68dcbce7
...
...
@@ -24,14 +24,14 @@ DROP TABLE IF EXISTS `mxk_accounts`;
/*!50503 SET character_set_client = utf8mb4 */
;
CREATE
TABLE
`mxk_accounts`
(
`ID`
varchar
(
45
)
NOT
NULL
COMMENT
'主键'
,
`UID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'用户ID'
,
`USERID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'用户ID'
,
`USERNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'用户名'
,
`DISPLAYNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'用户显示名'
,
`APPID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'应用ID'
,
`APPNAME`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'应用名称'
,
`RELATEDUSERNAME`
varchar
(
200
)
DEFAULT
NULL
COMMENT
'用户名'
,
`RELATEDPASSWORD`
varchar
(
200
)
DEFAULT
NULL
COMMENT
'密码'
,
`MODIFIEDDATE`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'修改时间'
,
`APPNAME`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'应用名称'
,
`USERNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'用户名'
,
`DISPLAYNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'用户显示名'
,
PRIMARY
KEY
(
`ID`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'用户账号表'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
...
...
@@ -321,6 +321,23 @@ CREATE TABLE `mxk_history_connector` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
/*!40101 SET character_set_client = @saved_cs_client */
;
--
-- Table structure for table `mxk_history_event`
--
DROP
TABLE
IF
EXISTS
`mxk_history_event`
;
/*!40101 SET @saved_cs_client = @@character_set_client */
;
/*!50503 SET character_set_client = utf8mb4 */
;
CREATE
TABLE
`mxk_history_event`
(
`id`
bigint
NOT
NULL
AUTO_INCREMENT
,
`eventname`
varchar
(
45
)
DEFAULT
NULL
,
`datatype`
varchar
(
45
)
DEFAULT
NULL
,
`datacount`
int
DEFAULT
NULL
,
`executedatetime`
timestamp
NULL
DEFAULT
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
DEFAULT
CHARSET
=
utf8
;
/*!40101 SET character_set_client = @saved_cs_client */
;
--
-- Table structure for table `mxk_history_login`
--
...
...
@@ -330,21 +347,22 @@ DROP TABLE IF EXISTS `mxk_history_login`;
/*!50503 SET character_set_client = utf8mb4 */
;
CREATE
TABLE
`mxk_history_login`
(
`ID`
varchar
(
45
)
NOT
NULL
COMMENT
'ID'
,
`SESSIONID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'SESSIONID'
,
`USERID`
varchar
(
45
)
NOT
NULL
COMMENT
'USERID'
,
`USERNAME`
varchar
(
200
)
NOT
NULL
COMMENT
'USERNAME'
,
`DISPLAYNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'DISPLAYNAME'
,
`MESSAGE`
varchar
(
200
)
DEFAULT
NULL
COMMENT
'MESSAGE'
,
`SOURCEIP`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'LOGIN SOURCEIP '
,
`LOGINTIME`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'LOGINTIME'
,
`LOGINTYPE`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'LOGINTYPE'
,
`UID`
varchar
(
45
)
NOT
NULL
COMMENT
'UID'
,
`CODE`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'CODE'
,
`PROVIDER`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'PROVIDER'
,
`SESSIONID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'SESSIONID'
,
`BROWSER`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'BROWSER'
,
`PLATFORM`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'PLATFORM'
,
`APPLICATION`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'APPLICATION'
,
`LOGINURL`
varchar
(
450
)
DEFAULT
NULL
COMMENT
'LOGINURL'
,
`LOGOUTTIME`
timestamp
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
COMMENT
'LOGOUTTIME'
,
`LOGINTIME`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'LOGINTIME'
,
`LOGOUTTIME`
varchar
(
50
)
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
COMMENT
'LOGOUTTIME'
,
`SESSIONSTATUS`
int
DEFAULT
'1'
,
PRIMARY
KEY
(
`ID`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'history_login'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
...
...
@@ -362,7 +380,7 @@ CREATE TABLE `mxk_history_login_apps` (
`LOGINTIME`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'LOGINTIME'
,
`APPID`
varchar
(
45
)
NOT
NULL
COMMENT
'ACCESS APPID'
,
`APPNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'APPNAME'
,
`U
ID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'U
ID'
,
`U
SERID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'USER
ID'
,
`USERNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'USERNAME'
,
`DISPLAYNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'DISPLAYNAME'
,
PRIMARY
KEY
(
`ID`
)
...
...
@@ -402,12 +420,12 @@ DROP TABLE IF EXISTS `mxk_history_synchronizer`;
/*!50503 SET character_set_client = utf8mb4 */
;
CREATE
TABLE
`mxk_history_synchronizer`
(
`ID`
varchar
(
45
)
NOT
NULL
COMMENT
'ID'
,
`SYNCID`
varchar
(
45
)
NOT
NULL
COMMENT
'
ACCESS APP
ID'
,
`SYNCNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
APP
NAME'
,
`OBJECTID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
U
ID'
,
`OBJECTNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
USER
NAME'
,
`OBJECTTYPE`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
DISPLAYNAM
E'
,
`SYNCTIME`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'
LOGIN
TIME'
,
`SYNCID`
varchar
(
45
)
NOT
NULL
COMMENT
'
SYNC
ID'
,
`SYNCNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
SYNC
NAME'
,
`OBJECTID`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
OBJECT
ID'
,
`OBJECTNAME`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
OBJECT
NAME'
,
`OBJECTTYPE`
varchar
(
45
)
DEFAULT
NULL
COMMENT
'
OBJECTTYP
E'
,
`SYNCTIME`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'
SYNC
TIME'
,
`RESULT`
varchar
(
45
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`ID`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'synchronizer logs'
;
...
...
@@ -605,15 +623,16 @@ DROP TABLE IF EXISTS `mxk_socials_associate`;
/*!50503 SET character_set_client = utf8mb4 */
;
CREATE
TABLE
`mxk_socials_associate`
(
`ID`
varchar
(
45
)
NOT
NULL
,
`UID`
varchar
(
45
)
NOT
NULL
COMMENT
'UID'
,
`USERID`
varchar
(
45
)
NOT
NULL
COMMENT
'USERID'
,
`USERNAME`
varchar
(
45
)
NOT
NULL
DEFAULT
'automatic'
,
`PROVIDER`
varchar
(
45
)
NOT
NULL
COMMENT
'PROVIDER'
,
`SOCIALUSERINFO`
text
COMMENT
'SOCIALUSERINFO'
,
`SOCIALU
ID`
varchar
(
100
)
NOT
NULL
COMMENT
'SOCIALU
ID'
,
`SOCIALU
SERID`
varchar
(
100
)
NOT
NULL
COMMENT
'SOCIALUSER
ID'
,
`EXATTRIBUTE`
text
,
`ACCESSTOKEN`
text
,
`CREATEDDATE`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`UPDATEDDATE`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`
USERNAME`
varchar
(
45
)
NO
T
NULL
,
`
TRANSMISSION`
varchar
(
45
)
DEFAUL
T
NULL
,
PRIMARY
KEY
(
`ID`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'socialsignon USER BIND'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
...
...
@@ -819,4 +838,4 @@ CREATE TABLE `mxk_userinfo_adjunct` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */
;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */
;
-- Dump completed on 2021-08-
09 22:41:0
7
-- Dump completed on 2021-08-
20 9:07:2
7
sql/maxkey_v2.9.0.GA_data.sql
浏览文件 @
68dcbce7
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录