Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
d3b2f4da
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
11 个月 前同步成功
通知
76
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,发现更多精彩内容 >>
提交
d3b2f4da
编写于
4月 25, 2022
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SocialSignOn
上级
ba518828
变更
26
展开全部
隐藏空白更改
内联
并排
Showing
26 changed file
with
156 addition
and
94 deletion
+156
-94
gradle.properties
gradle.properties
+3
-3
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/jwt/AuthJwt.java
...tion-core/src/main/java/org/maxkey/authn/jwt/AuthJwt.java
+10
-0
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/SocialSignOnEndpoint.java
...xkey/authn/support/socialsignon/SocialSignOnEndpoint.java
+5
-5
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/SocialsAssociateMapper.xml
...y/persistence/mapper/xml/mysql/SocialsAssociateMapper.xml
+6
-5
maxkey-web-frontend/maxkey-web-app/src/app/layout/basic/basic.component.ts
...nd/maxkey-web-app/src/app/layout/basic/basic.component.ts
+1
-10
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-associate/socials-associate.component.html
...config/socials-associate/socials-associate.component.html
+11
-3
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-associate/socials-associate.component.ts
...s/config/socials-associate/socials-associate.component.ts
+10
-15
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/callback.component.ts
...key-web-app/src/app/routes/passport/callback.component.ts
+20
-11
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/login/login.component.ts
...-web-app/src/app/routes/passport/login/login.component.ts
+1
-0
maxkey-web-frontend/maxkey-web-app/src/app/service/authentication.service.ts
.../maxkey-web-app/src/app/service/authentication.service.ts
+7
-1
maxkey-web-frontend/maxkey-web-app/src/app/service/socials-provider.service.ts
...axkey-web-app/src/app/service/socials-provider.service.ts
+4
-0
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/layout-nav.component.html
...pp/src/app/theme/layout-default/layout-nav.component.html
+1
-1
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/layout.component.ts
...-web-app/src/app/theme/layout-default/layout.component.ts
+1
-1
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/style/_header.less
...y-web-app/src/app/theme/layout-default/style/_header.less
+12
-3
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/style/theme-dark.less
...eb-app/src/app/theme/layout-default/style/theme-dark.less
+1
-0
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/style/theme-default.less
...app/src/app/theme/layout-default/style/theme-default.less
+1
-0
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
...ey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
+5
-3
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
...ey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
+3
-1
maxkey-web-frontend/maxkey-web-app/src/assets/style.dark.css
maxkey-web-frontend/maxkey-web-app/src/assets/style.dark.css
+10
-1
maxkey-web-frontend/maxkey-web-app/src/styles/theme.less
maxkey-web-frontend/maxkey-web-app/src/styles/theme.less
+1
-1
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/passport/login/login.component.html
...gt-app/src/app/routes/passport/login/login.component.html
+18
-22
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyMvcConfig.java
...-web-maxkey/src/main/java/org/maxkey/MaxKeyMvcConfig.java
+2
-3
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/IndexEndpoint.java
...rc/main/java/org/maxkey/web/contorller/IndexEndpoint.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/LoginEntryPoint.java
.../main/java/org/maxkey/web/contorller/LoginEntryPoint.java
+6
-2
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/LogoutEndpoint.java
...c/main/java/org/maxkey/web/contorller/LogoutEndpoint.java
+1
-1
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SocialSignOnListController.java
...org/maxkey/web/contorller/SocialSignOnListController.java
+15
-1
未找到文件。
gradle.properties
浏览文件 @
d3b2f4da
...
...
@@ -56,8 +56,8 @@ xmlbeansVersion =5.0.2
commonscompressVersion
=
1.20
log4jVersion
=
2.17.1
kafkaclientsVersion
=
2.8.1
rocketmqclientVersion
=
4.9.
2
rocketmqspringbootVersion
=
2.2.
1
rocketmqclientVersion
=
4.9.
3
rocketmqspringbootVersion
=
2.2.
2
poiVersion
=
5.1.0
tomcatVersion
=
9.0.62
tomcatembedloggingjuliVersion
=
8.5.2
...
...
@@ -117,7 +117,7 @@ jakartavalidationapiVersion =3.0.0
attoparserVersion
=
2.0.5.RELEASE
unbescapeVersion
=
1.1.6.RELEASE
slf4jVersion
=
1.7.35
jacksonVersion
=
2.13.
1
jacksonVersion
=
2.13.
2
woodstoxVersion
=
6.2.8
bouncycastleVersion
=
1.69
junitVersion
=
4.11
...
...
maxkey-authentications/maxkey-authentication-core/src/main/java/org/maxkey/authn/jwt/AuthJwt.java
浏览文件 @
d3b2f4da
...
...
@@ -39,6 +39,7 @@ public class AuthJwt implements Serializable {
private
String
email
;
private
String
instId
;
private
String
instName
;
private
int
passwordSetType
;
private
List
<
String
>
authorities
;
...
...
@@ -147,6 +148,15 @@ public class AuthJwt implements Serializable {
public
void
setTicket
(
String
ticket
)
{
this
.
ticket
=
ticket
;
}
public
int
getPasswordSetType
()
{
return
passwordSetType
;
}
public
void
setPasswordSetType
(
int
passwordSetType
)
{
this
.
passwordSetType
=
passwordSetType
;
}
@Override
public
String
toString
()
{
...
...
maxkey-authentications/maxkey-authentication-social/src/main/java/org/maxkey/authn/support/socialsignon/SocialSignOnEndpoint.java
浏览文件 @
d3b2f4da
...
...
@@ -23,6 +23,7 @@ package org.maxkey.authn.support.socialsignon;
import
javax.servlet.http.HttpServletRequest
;
import
org.maxkey.authn.LoginCredential
;
import
org.maxkey.authn.annotation.CurrentUser
;
import
org.maxkey.authn.jwt.AuthJwt
;
import
org.maxkey.authn.web.AuthorizationUtils
;
import
org.maxkey.constants.ConstsLoginType
;
...
...
@@ -87,16 +88,15 @@ public class SocialSignOnEndpoint extends AbstractSocialSignOnEndpoint{
}
@RequestMapping
(
value
={
"/bind/{provider}"
},
method
=
RequestMethod
.
POS
T
)
public
ResponseEntity
<?>
bind
(
@PathVariable
String
provider
)
{
@RequestMapping
(
value
={
"/bind/{provider}"
},
method
=
RequestMethod
.
GE
T
)
public
ResponseEntity
<?>
bind
(
@PathVariable
String
provider
,
@CurrentUser
UserInfo
userInfo
)
{
//auth call back may exception
try
{
String
instId
=
WebContext
.
getInst
().
getId
();
SocialsAssociate
socialsAssociate
=
this
.
authCallback
(
instId
,
provider
);
UserInfo
userInfo
=
AuthorizationUtils
.
getUserInfo
();
SocialsAssociate
socialsAssociate
=
this
.
authCallback
(
userInfo
.
getInstId
(),
provider
);
socialsAssociate
.
setSocialUserInfo
(
accountJsonString
);
socialsAssociate
.
setUserId
(
userInfo
.
getId
());
socialsAssociate
.
setUsername
(
userInfo
.
getUsername
());
socialsAssociate
.
setInstId
(
userInfo
.
getInstId
());
//socialsAssociate.setAccessToken(JsonUtils.object2Json(accessToken));
//socialsAssociate.setExAttribute(JsonUtils.object2Json(accessToken.getResponseObject()));
_logger
.
debug
(
"Social Bind : "
+
socialsAssociate
);
...
...
maxkey-persistence/src/main/resources/org/maxkey/persistence/mapper/xml/mysql/SocialsAssociateMapper.xml
浏览文件 @
d3b2f4da
...
...
@@ -11,6 +11,7 @@
a.id,
a.userid,
a.username,
a.socialuserid,
a.createdDate,
a.updatedDate
from
...
...
@@ -18,12 +19,12 @@
left join
mxk_socials_associate a
on a.provider = p.provider and a.userid = #{id}
on a.provider = p.provider
and a.instid = p.instid
and a.instid = #{instId}
and a.userid = #{id}
where
a.instid = p.instid
and a.instid = #{instId}
and p.status =1
p.status =1
order by p.sortindex
</select>
...
...
maxkey-web-frontend/maxkey-web-app/src/app/layout/basic/basic.component.ts
浏览文件 @
d3b2f4da
...
...
@@ -20,16 +20,7 @@ import { LayoutDefaultOptions } from '../../theme/layout-default';
<layout-default-header-item direction="left">
<a href="#">
<img src="../assets/logo.jpg" alt="logo" style="height: 50px;height: 50px;float: left;" />
<div
style="letter-spacing: 2px;
font-size: 20px;
font-weight: bolder;
color:white;
width: 450px;
margin-top: 12px;"
>
Max<span style="color: #FFD700;">Key</span>{{ 'mxk.title' | i18n }}
</div>
<div class="alain-default__header-title"> Max<span style="color: #FFD700;">Key</span>{{ 'mxk.title' | i18n }} </div>
</a>
</layout-default-header-item>
...
...
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-associate/socials-associate.component.html
浏览文件 @
d3b2f4da
...
...
@@ -40,9 +40,17 @@
</td>
<td
nzAlign=
"left"
nzBreakWord=
"false"
><div
nz-col
>
<button
nz-button
type=
"button"
[nzType]=
"'primary'"
style=
"float: left"
>
{{ 'mxk.text.edit' | i18n }}
</button>
<button
nz-button
type=
"button"
(click)=
"onDelete($event, data.id)"
[nzType]=
"'primary'"
nzDanger
>
{{
'mxk.text.delete' | i18n
<button
*ngIf=
"data.updatedDate === null"
nz-button
type=
"button"
(click)=
"onAdd($event, data.provider)"
[nzType]=
"'primary'"
style=
"float: left"
>
{{ 'mxk.socialsassociate.text.bind' | i18n }}
</button
>
<button
*ngIf=
"data.updatedDate"
nz-button
type=
"button"
(click)=
"onDelete($event, data.id)"
[nzType]=
"'primary'"
nzDanger
>
{{
'mxk.socialsassociate.text.unbind' | i18n
}}
</button></div
></td
>
...
...
maxkey-web-frontend/maxkey-web-app/src/app/routes/config/socials-associate/socials-associate.component.ts
浏览文件 @
d3b2f4da
...
...
@@ -6,10 +6,14 @@ import { NzSafeAny } from 'ng-zorro-antd/core/types';
import
{
NzMessageService
}
from
'
ng-zorro-antd/message
'
;
import
{
NzModalRef
,
NzModalService
}
from
'
ng-zorro-antd/modal
'
;
import
{
NzTableQueryParams
}
from
'
ng-zorro-antd/table
'
;
import
{
logging
}
from
'
protractor
'
;
import
{
SocialsAssociateService
}
from
'
../../../service/socials-associate.service
'
;
import
{
SocialsProviderService
}
from
'
../../../service/socials-provider.service
'
;
import
{
set2String
}
from
'
../../../shared/index
'
;
import
{
log
}
from
'
console
'
;
@
Component
({
selector
:
'
app-socials-associate
'
,
templateUrl
:
'
./socials-associate.component.html
'
,
...
...
@@ -66,6 +70,7 @@ export class SocialsAssociateComponent implements OnInit {
constructor
(
private
modalService
:
NzModalService
,
private
socialsProviderService
:
SocialsProviderService
,
private
socialsAssociateService
:
SocialsAssociateService
,
private
viewContainerRef
:
ViewContainerRef
,
private
fb
:
FormBuilder
,
...
...
@@ -89,22 +94,11 @@ export class SocialsAssociateComponent implements OnInit {
onReset
():
void
{
}
onAdd
(
e
:
MouseEvent
):
void
{
onAdd
(
e
:
MouseEvent
,
provider
:
string
):
void
{
e
.
preventDefault
();
const
modal
=
this
.
modalService
.
create
({
//nzContent: SocialsProviderEditerComponent,
nzViewContainerRef
:
this
.
viewContainerRef
,
nzComponentParams
:
{
isEdit
:
false
,
id
:
''
},
nzOnOk
:
()
=>
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
))
});
// Return a result when closed
modal
.
afterClose
.
subscribe
(
result
=>
{
if
(
result
.
refresh
)
{
this
.
fetch
();
}
this
.
socialsProviderService
.
authorize
(
provider
).
subscribe
(
res
=>
{
//console.log(res.data);
window
.
location
.
href
=
res
.
data
;
});
}
...
...
@@ -135,6 +129,7 @@ export class SocialsAssociateComponent implements OnInit {
this
.
query
.
params
.
startDate
=
''
;
}
this
.
socialsAssociateService
.
fetch
(
this
.
query
.
params
).
subscribe
(
res
=>
{
console
.
log
(
res
.
data
);
this
.
query
.
results
.
rows
=
res
.
data
;
this
.
query
.
submitLoading
=
false
;
this
.
query
.
tableLoading
=
false
;
...
...
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/callback.component.ts
浏览文件 @
d3b2f4da
import
{
Inject
,
Optional
,
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
}
from
'
@angular/router
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
ReuseTabService
}
from
'
@delon/abc/reuse-tab
'
;
import
{
SettingsService
}
from
'
@delon/theme
'
;
...
...
@@ -14,8 +14,9 @@ export class CallbackComponent implements OnInit {
provider
=
''
;
constructor
(
private
router
:
Router
,
private
socialsProviderService
:
SocialsProviderService
,
private
settingsS
rv
:
SettingsService
,
private
settingsS
ervice
:
SettingsService
,
private
authenticationService
:
AuthenticationService
,
@
Optional
()
@
Inject
(
ReuseTabService
)
...
...
@@ -25,14 +26,22 @@ export class CallbackComponent implements OnInit {
ngOnInit
():
void
{
this
.
provider
=
this
.
route
.
snapshot
.
params
[
'
provider
'
];
this
.
socialsProviderService
.
callback
(
this
.
provider
,
this
.
route
.
snapshot
.
queryParams
).
subscribe
(
res
=>
{
if
(
res
.
code
===
0
)
{
// 清空路由复用信息
this
.
reuseTabService
.
clear
();
// 设置用户Token信息
this
.
authenticationService
.
auth
(
res
.
data
);
}
this
.
authenticationService
.
navigate
({});
});
if
(
!
this
.
settingsService
.
user
.
name
)
{
this
.
socialsProviderService
.
callback
(
this
.
provider
,
this
.
route
.
snapshot
.
queryParams
).
subscribe
(
res
=>
{
if
(
res
.
code
===
0
)
{
// 清空路由复用信息
this
.
reuseTabService
.
clear
();
// 设置用户Token信息
this
.
authenticationService
.
auth
(
res
.
data
);
}
this
.
authenticationService
.
navigate
({});
});
}
else
{
this
.
socialsProviderService
.
bind
(
this
.
provider
,
this
.
route
.
snapshot
.
queryParams
).
subscribe
(
res
=>
{
if
(
res
.
code
===
0
)
{
}
this
.
router
.
navigateByUrl
(
'
/config/socialsassociate
'
);
});
}
}
}
maxkey-web-frontend/maxkey-web-app/src/app/routes/passport/login/login.component.ts
浏览文件 @
d3b2f4da
...
...
@@ -260,6 +260,7 @@ export class UserLoginComponent implements OnInit, OnDestroy {
}
getQrCode
():
void
{
this
.
authenticationService
.
clearUser
();
this
.
socialsProviderService
.
scanqrcode
(
this
.
socials
.
qrScan
).
subscribe
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
this
.
socials
.
qrScan
===
'
workweixin
'
)
{
...
...
maxkey-web-frontend/maxkey-web-app/src/app/service/authentication.service.ts
浏览文件 @
d3b2f4da
...
...
@@ -49,6 +49,11 @@ export class AuthenticationService {
this
.
tokenService
.
clear
();
}
clearUser
()
{
let
user
:
User
=
{};
this
.
settingsService
.
setUser
(
user
);
}
auth
(
authJwt
:
any
)
{
let
user
:
User
=
{
name
:
`
${
authJwt
.
displayName
}
(
${
authJwt
.
username
}
)`
,
...
...
@@ -56,7 +61,8 @@ export class AuthenticationService {
username
:
authJwt
.
username
,
userId
:
authJwt
.
id
,
avatar
:
'
./assets/img/avatar.svg
'
,
email
:
authJwt
.
email
email
:
authJwt
.
email
,
passwordSetType
:
authJwt
.
passwordSetType
};
let
hostnames
=
window
.
location
.
hostname
.
split
(
'
.
'
);
...
...
maxkey-web-frontend/maxkey-web-app/src/app/service/socials-provider.service.ts
浏览文件 @
d3b2f4da
...
...
@@ -26,4 +26,8 @@ export class SocialsProviderService extends BaseService<SocialsProvider> {
callback
(
provider
:
string
,
params
:
NzSafeAny
):
Observable
<
Message
<
SocialsProvider
>>
{
return
this
.
getByParams
(
params
,
`/logon/oauth20/callback/
${
provider
}
?_allow_anonymous=true`
);
}
bind
(
provider
:
string
,
params
:
NzSafeAny
):
Observable
<
Message
<
SocialsProvider
>>
{
return
this
.
getByParams
(
params
,
`/logon/oauth20/bind/
${
provider
}
?_allow_anonymous=true`
);
}
}
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/layout-nav.component.html
浏览文件 @
d3b2f4da
...
...
@@ -2,7 +2,7 @@
<ul
nz-menu
nzMode=
"horizontal"
nzTheme=
"dark"
style=
"text-align: center"
>
<!--一级菜单-->
<ng-container
*ngFor=
"let mnav of ls"
>
<li
nz-menu-item
*ngIf=
"mnav.children.length == 0"
>
<li
nz-menu-item
*ngIf=
"mnav.children.length == 0"
style=
"min-width: 80px"
>
<a
href=
"#{{ mnav.link }}"
>
{{ mnav.text }}
</a>
</li>
<li
nz-submenu
nzTitle=
"{{ mnav.text }}"
*ngIf=
"mnav.children.length > 0"
>
...
...
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/layout.component.ts
浏览文件 @
d3b2f4da
...
...
@@ -18,7 +18,7 @@ import { LayoutDefaultOptions } from './types';
<div class="alain-default__progress-bar" *ngIf="isFetching"></div>
<layout-default-header [options]="options" [items]="headerItems"></layout-default-header>
<!--menu-->
<div id="mainMenu" nzTheme="dark" style="background: #001529;">
<div id="mainMenu" nzTheme="dark" style="background: #001529;"
class="alain-default__fixed"
>
<!--<ng-container *ngTemplateOutlet="asideUser"></ng-container>-->
<ng-container *ngTemplateOutlet="nav"></ng-container>
<layout-default-nav *ngIf="!nav" class="d-block" style="margin-top: 64px; width:80%"></layout-default-nav>
...
...
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/style/_header.less
浏览文件 @
d3b2f4da
...
...
@@ -9,6 +9,15 @@
background-color: @alain-default-header-bg;
box-shadow: @alain-default-header-box-shadow;
&-title {
width: 450px;
margin-top: 12px;
color:@alain-default-header-title;
font-weight: bolder;
font-size: 20px;
letter-spacing: 2px;
}
&-logo {
width: @alain-default-aside-wd;
margin-left: -@alain-default-header-padding;
...
...
@@ -60,7 +69,7 @@
&-item,
nz-badge {
color:
#fff
;
color:
black
;
}
&-item {
...
...
@@ -75,8 +84,8 @@
transition: background-color 300ms;
&:hover {
color:
#fff
;
background-color: rgb(
255 255 255
/ 20%) !important;
color:
black
;
background-color: rgb(
188 181 181
/ 20%) !important;
}
> i,
...
...
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/style/theme-dark.less
浏览文件 @
d3b2f4da
...
...
@@ -2,6 +2,7 @@
@alain-default-header-bg: @component-background;
@alain-default-header-box-shadow: @shadow-1-down;
@alain-default-header-title:white;
@alain-default-aside-bg: @component-background;
@alain-default-aside-nav-selected-bg: @component-background;
...
...
maxkey-web-frontend/maxkey-web-app/src/app/theme/layout-default/style/theme-default.less
浏览文件 @
d3b2f4da
...
...
@@ -3,6 +3,7 @@
@alain-default-ease: cubic-bezier(0.25, 0, 0.15, 1);
@alain-default-header-hg: 64px;
@alain-default-header-bg: #fff;
@alain-default-header-title:black;
@alain-default-header-padding: @layout-gutter * 2;
@alain-default-header-search-enabled: true;
@alain-default-header-icon-fs: 18px;
...
...
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/en-US.json
浏览文件 @
d3b2f4da
...
...
@@ -18,7 +18,7 @@
"text.username"
:
"Username"
,
"text.mobile"
:
"Mobile Number"
,
"text.password"
:
"Password"
,
"text.captcha"
:
"C
APTCHA
"
,
"text.captcha"
:
"C
aptcha
"
,
"text.smscode"
:
"Code"
},
"menu"
:
{
...
...
@@ -222,8 +222,10 @@
"icon"
:
"Icon"
,
"provider"
:
"Provider"
,
"providerName"
:
"ProviderName"
,
"createdDate"
:
"BindTime "
,
"updatedDate"
:
"LastLoginTime"
"createdDate"
:
"BindTime"
,
"updatedDate"
:
"LastLoginTime"
,
"text.bind"
:
"Bind"
,
"text.unbind"
:
"Unbind"
},
"password"
:{
"id"
:
"Id"
,
...
...
maxkey-web-frontend/maxkey-web-app/src/assets/i18n/zh-CN.json
浏览文件 @
d3b2f4da
...
...
@@ -516,7 +516,9 @@
"provider"
:
"供应商"
,
"providerName"
:
"供应商名称"
,
"createdDate"
:
"绑定时间"
,
"updatedDate"
:
"最近登录时间"
"updatedDate"
:
"最近登录时间"
,
"text.bind"
:
"绑定账号"
,
"text.unbind"
:
"解除绑定"
},
"password"
:{
"id"
:
"用户编码"
,
...
...
maxkey-web-frontend/maxkey-web-app/src/assets/style.dark.css
浏览文件 @
d3b2f4da
此差异已折叠。
点击以展开。
maxkey-web-frontend/maxkey-web-app/src/styles/theme.less
浏览文件 @
d3b2f4da
...
...
@@ -2,7 +2,7 @@
// - `default` Default theme
// - `dark` Import the official dark less style file
// - `compact` Import the official compact less style file
@import '
@delon/them
e/theme-default.less';
@import '
../app/theme/layout-default/styl
e/theme-default.less';
// ==========The following is the custom theme variable area==========
// The theme paraments can be generated at https://ng-alain.github.io/ng-alain/
...
...
maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/passport/login/login.component.html
浏览文件 @
d3b2f4da
<form
nz-form
[formGroup]=
"form"
(ngSubmit)=
"submit()"
role=
"form"
>
<nz-alert
*ngIf=
"error"
[nzType]=
"'error'"
[nzMessage]=
"error"
[nzShowIcon]=
"true"
class=
"mb-lg"
></nz-alert>
<nz-form-item
style=
"width: 100%"
>
<nz-form-control
nzErrorTip=
"
Please enter username
"
>
<nz-form-control
nzErrorTip=
""
>
<nz-input-group
nzSize=
"large"
[nzAddOnBefore]=
"usernamePreffixIcon"
>
<input
nz-input
formControlName=
"userName"
placeholder=
"{{ 'mxk.login.text.username' | i18n }}"
style=
"font-weight: bold"
/>
</nz-input-group>
...
...
@@ -11,7 +11,7 @@
</nz-form-control>
</nz-form-item>
<nz-form-item
style=
"width: 100%"
>
<nz-form-control
nzErrorTip=
"
Please enter password
"
>
<nz-form-control
nzErrorTip=
""
>
<nz-input-group
[nzSuffix]=
"suffixTemplate"
nzSize=
"large"
[nzAddOnBefore]=
"passwordPreffixIcon"
>
<input
[type]=
"passwordVisible ? 'text' : 'password'"
...
...
@@ -30,26 +30,22 @@
</nz-form-control>
</nz-form-item>
<nz-form-item
style=
"width: 100%"
>
<nz-form-control
nzErrorTip=
"Please enter captcha"
>
<nz-row
[nzGutter]=
"8"
>
<nz-col
[nzSpan]=
"16"
>
<nz-input-group
nzSearch
nzSize=
"large"
[nzAddOnBefore]=
"captchaPreffixIcon"
>
<input
style=
"font-weight: bold"
type=
"text"
formControlName=
"captcha"
nz-input
placeholder=
"{{ 'mxk.login.text.captcha' | i18n }}"
/>
</nz-input-group>
<ng-template
#captchaPreffixIcon
>
<i
nz-icon
nzType=
"lock"
nzTheme=
"outline"
></i>
</ng-template>
</nz-col>
<nz-col
[nzSpan]=
"8"
>
<img
src=
"{{ imageCaptcha }}"
(click)=
"getImageCaptcha()"
/>
</nz-col>
</nz-row>
<nz-form-control
nzErrorTip=
""
>
<nz-input-group
nzSearch
nzSize=
"large"
[nzAddOnBefore]=
"captchaPreffixIcon"
nzSearch
[nzAddOnAfter]=
"suffixImageCaptchaButton"
>
<input
style=
"font-weight: bold"
type=
"text"
formControlName=
"captcha"
nz-input
placeholder=
"{{ 'mxk.login.text.captcha' | i18n }}"
/>
</nz-input-group>
<ng-template
#captchaPreffixIcon
>
<i
nz-icon
nzType=
"lock"
nzTheme=
"outline"
></i>
</ng-template>
<ng-template
#suffixImageCaptchaButton
>
<img
src=
"{{ imageCaptcha }}"
(click)=
"getImageCaptcha()"
/>
</ng-template>
</nz-form-control>
</nz-form-item>
<nz-form-item>
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/MaxKeyMvcConfig.java
浏览文件 @
d3b2f4da
...
...
@@ -135,10 +135,9 @@ public class MaxKeyMvcConfig implements WebMvcConfigurer {
.
addPathPatterns
(
"/socialsignon/**"
)
.
addPathPatterns
(
"/authz/credential/**"
)
.
addPathPatterns
(
"/authz/oauth/v20/approval_confirm/**"
)
.
addPathPatterns
(
"/authz/oauth/v20/authorize/approval/**"
);
.
addPathPatterns
(
"/authz/oauth/v20/authorize/approval/**"
)
.
addPathPatterns
(
"/logon/oauth20/bind/**"
);
;
_logger
.
debug
(
"add Permission Interceptor"
);
registry
.
addInterceptor
(
historyLogsInterceptor
)
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/
endpoint
/IndexEndpoint.java
→
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/
contorller
/IndexEndpoint.java
浏览文件 @
d3b2f4da
...
...
@@ -15,7 +15,7 @@
*/
package
org.maxkey.web.
endpoint
;
package
org.maxkey.web.
contorller
;
import
java.io.IOException
;
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/
endpoint
/LoginEntryPoint.java
→
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/
contorller
/LoginEntryPoint.java
浏览文件 @
d3b2f4da
...
...
@@ -15,7 +15,7 @@
*/
package
org.maxkey.web.
endpoint
;
package
org.maxkey.web.
contorller
;
import
java.util.HashMap
;
import
java.util.regex.Pattern
;
...
...
@@ -157,7 +157,11 @@ public class LoginEntryPoint {
if
(
StringUtils
.
isNotBlank
(
authType
)){
Authentication
authentication
=
authenticationProvider
.
authenticate
(
loginCredential
);
if
(
authentication
!=
null
)
{
authJwtMessage
=
new
Message
<
AuthJwt
>(
authJwtService
.
genAuthJwt
(
authentication
));
AuthJwt
authJwt
=
authJwtService
.
genAuthJwt
(
authentication
);
if
(
WebContext
.
getAttribute
(
WebConstants
.
CURRENT_USER_PASSWORD_SET_TYPE
)!=
null
)
authJwt
.
setPasswordSetType
(
(
Integer
)
WebContext
.
getAttribute
(
WebConstants
.
CURRENT_USER_PASSWORD_SET_TYPE
));
authJwtMessage
=
new
Message
<
AuthJwt
>(
authJwt
);
}
}
else
{
_logger
.
error
(
"Login AuthN type must eq normal , tfa or mobile . "
);
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/
endpoint
/LogoutEndpoint.java
→
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/
contorller
/LogoutEndpoint.java
浏览文件 @
d3b2f4da
...
...
@@ -15,7 +15,7 @@
*/
package
org.maxkey.web.
endpoint
;
package
org.maxkey.web.
contorller
;
import
java.util.Iterator
;
import
java.util.Set
;
...
...
maxkey-webs/maxkey-web-maxkey/src/main/java/org/maxkey/web/contorller/SocialSignOnListController.java
浏览文件 @
d3b2f4da
/*
* Copyright [202
0
] [MaxKey of copyright http://www.maxkey.top]
* Copyright [202
2
] [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.
...
...
@@ -23,13 +23,16 @@ import org.maxkey.authn.annotation.CurrentUser;
import
org.maxkey.entity.Message
;
import
org.maxkey.entity.SocialsAssociate
;
import
org.maxkey.entity.UserInfo
;
import
org.maxkey.entity.apps.Apps
;
import
org.maxkey.persistence.service.SocialsAssociatesService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
...
...
@@ -52,4 +55,15 @@ public class SocialSignOnListController {
return
new
Message
<
List
<
SocialsAssociate
>>(
listSocialsAssociate
).
buildResponse
();
}
@ResponseBody
@RequestMapping
(
value
={
"/delete"
},
produces
=
{
MediaType
.
APPLICATION_JSON_VALUE
})
public
ResponseEntity
<?>
delete
(
@RequestParam
(
"ids"
)
String
ids
,
@CurrentUser
UserInfo
currentUser
)
{
_logger
.
debug
(
"-delete ids : {} "
,
ids
);
if
(
socialsAssociatesService
.
deleteBatch
(
ids
))
{
return
new
Message
<
Apps
>(
Message
.
SUCCESS
).
buildResponse
();
}
else
{
return
new
Message
<
Apps
>(
Message
.
FAIL
).
buildResponse
();
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录