Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yujianwangzivayy
MaxKey
提交
19180584
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,发现更多精彩内容 >>
提交
19180584
编写于
3月 02, 2022
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cached App Details
上级
13102d53
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
161 addition
and
48 deletion
+161
-48
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsCasDetailsService.java
...org/maxkey/persistence/service/AppsCasDetailsService.java
+23
-2
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsFormBasedDetailsService.java
...xkey/persistence/service/AppsFormBasedDetailsService.java
+23
-2
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsJwtDetailsService.java
...org/maxkey/persistence/service/AppsJwtDetailsService.java
+23
-2
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsSaml20DetailsService.java
.../maxkey/persistence/service/AppsSaml20DetailsService.java
+23
-2
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsTokenBasedDetailsService.java
...key/persistence/service/AppsTokenBasedDetailsService.java
+23
-2
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java
...a/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java
+2
-3
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
...java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
+4
-4
maxkey-protocols/maxkey-protocol-formbased/src/main/java/org/maxkey/authz/formbased/endpoint/FormBasedAuthorizeEndpoint.java
.../authz/formbased/endpoint/FormBasedAuthorizeEndpoint.java
+1
-1
maxkey-protocols/maxkey-protocol-jwt/src/main/java/org/maxkey/authz/token/endpoint/JwtAuthorizeEndpoint.java
...org/maxkey/authz/token/endpoint/JwtAuthorizeEndpoint.java
+2
-2
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/client/JdbcClientDetailsService.java
...uthz/oauth2/provider/client/JdbcClientDetailsService.java
+23
-15
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/IdpInitEndpoint.java
...axkey/authz/saml20/provider/endpoint/IdpInitEndpoint.java
+1
-1
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/SingleSignOnEndpoint.java
.../authz/saml20/provider/endpoint/SingleSignOnEndpoint.java
+1
-1
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/TokenBasedAuthorizeEndpoint.java
...key/authz/token/endpoint/TokenBasedAuthorizeEndpoint.java
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/jobs/AccountsStrategyJob.java
...gt/src/main/java/org/maxkey/jobs/AccountsStrategyJob.java
+6
-5
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/CasDetailsController.java
.../org/maxkey/web/apps/contorller/CasDetailsController.java
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/FormBasedDetailsController.java
...axkey/web/apps/contorller/FormBasedDetailsController.java
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/JwtDetailsController.java
.../org/maxkey/web/apps/contorller/JwtDetailsController.java
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/SAML20DetailsController.java
...g/maxkey/web/apps/contorller/SAML20DetailsController.java
+1
-1
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/TokenBasedDetailsController.java
...xkey/web/apps/contorller/TokenBasedDetailsController.java
+1
-1
未找到文件。
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsCasDetailsService.java
浏览文件 @
19180584
...
...
@@ -17,14 +17,25 @@
package
org.maxkey.persistence.service
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.maxkey.entity.apps.AppsCasDetails
;
import
org.maxkey.persistence.mapper.AppsCasDetailsMapper
;
import
org.springframework.stereotype.Repository
;
import
com.github.benmanes.caffeine.cache.Cache
;
import
com.github.benmanes.caffeine.cache.Caffeine
;
@Repository
public
class
AppsCasDetailsService
extends
JpaBaseService
<
AppsCasDetails
>{
protected
final
static
Cache
<
String
,
AppsCasDetails
>
detailsCache
=
Caffeine
.
newBuilder
()
.
expireAfterWrite
(
30
,
TimeUnit
.
MINUTES
)
.
maximumSize
(
200000
)
.
build
();
public
AppsCasDetailsService
()
{
super
(
AppsCasDetailsMapper
.
class
);
}
...
...
@@ -37,7 +48,17 @@ public class AppsCasDetailsService extends JpaBaseService<AppsCasDetails>{
return
(
AppsCasDetailsMapper
)
super
.
getMapper
();
}
public
AppsCasDetails
getAppDetails
(
String
id
)
{
return
getMapper
().
getAppDetails
(
id
);
public
AppsCasDetails
getAppDetails
(
String
id
,
boolean
cached
)
{
AppsCasDetails
details
=
null
;
if
(
cached
)
{
details
=
detailsCache
.
getIfPresent
(
id
);
if
(
details
==
null
)
{
details
=
getMapper
().
getAppDetails
(
id
);
detailsCache
.
put
(
id
,
details
);
}
}
else
{
details
=
getMapper
().
getAppDetails
(
id
);
}
return
details
;
}
}
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsFormBasedDetailsService.java
浏览文件 @
19180584
...
...
@@ -17,14 +17,25 @@
package
org.maxkey.persistence.service
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.maxkey.entity.apps.AppsFormBasedDetails
;
import
org.maxkey.persistence.mapper.AppsFormBasedDetailsMapper
;
import
org.springframework.stereotype.Repository
;
import
com.github.benmanes.caffeine.cache.Cache
;
import
com.github.benmanes.caffeine.cache.Caffeine
;
@Repository
public
class
AppsFormBasedDetailsService
extends
JpaBaseService
<
AppsFormBasedDetails
>{
protected
final
static
Cache
<
String
,
AppsFormBasedDetails
>
detailsCache
=
Caffeine
.
newBuilder
()
.
expireAfterWrite
(
30
,
TimeUnit
.
MINUTES
)
.
maximumSize
(
200000
)
.
build
();
public
AppsFormBasedDetailsService
()
{
super
(
AppsFormBasedDetailsMapper
.
class
);
}
...
...
@@ -37,7 +48,17 @@ public class AppsFormBasedDetailsService extends JpaBaseService<AppsFormBasedDe
return
(
AppsFormBasedDetailsMapper
)
super
.
getMapper
();
}
public
AppsFormBasedDetails
getAppDetails
(
String
id
)
{
return
getMapper
().
getAppDetails
(
id
);
public
AppsFormBasedDetails
getAppDetails
(
String
id
,
boolean
cached
)
{
AppsFormBasedDetails
details
=
null
;
if
(
cached
)
{
details
=
detailsCache
.
getIfPresent
(
id
);
if
(
details
==
null
)
{
details
=
getMapper
().
getAppDetails
(
id
);
detailsCache
.
put
(
id
,
details
);
}
}
else
{
details
=
getMapper
().
getAppDetails
(
id
);
}
return
details
;
}
}
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsJwtDetailsService.java
浏览文件 @
19180584
...
...
@@ -17,14 +17,25 @@
package
org.maxkey.persistence.service
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.maxkey.entity.apps.AppsJwtDetails
;
import
org.maxkey.persistence.mapper.AppsJwtDetailsMapper
;
import
org.springframework.stereotype.Repository
;
import
com.github.benmanes.caffeine.cache.Cache
;
import
com.github.benmanes.caffeine.cache.Caffeine
;
@Repository
public
class
AppsJwtDetailsService
extends
JpaBaseService
<
AppsJwtDetails
>{
protected
final
static
Cache
<
String
,
AppsJwtDetails
>
detailsCache
=
Caffeine
.
newBuilder
()
.
expireAfterWrite
(
30
,
TimeUnit
.
MINUTES
)
.
maximumSize
(
200000
)
.
build
();
public
AppsJwtDetailsService
()
{
super
(
AppsJwtDetailsMapper
.
class
);
}
...
...
@@ -37,7 +48,17 @@ public class AppsJwtDetailsService extends JpaBaseService<AppsJwtDetails>{
return
(
AppsJwtDetailsMapper
)
super
.
getMapper
();
}
public
AppsJwtDetails
getAppDetails
(
String
id
)
{
return
getMapper
().
getAppDetails
(
id
);
public
AppsJwtDetails
getAppDetails
(
String
id
,
boolean
cached
)
{
AppsJwtDetails
details
=
null
;
if
(
cached
)
{
details
=
detailsCache
.
getIfPresent
(
id
);
if
(
details
==
null
)
{
details
=
getMapper
().
getAppDetails
(
id
);
detailsCache
.
put
(
id
,
details
);
}
}
else
{
details
=
getMapper
().
getAppDetails
(
id
);
}
return
details
;
}
}
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsSaml20DetailsService.java
浏览文件 @
19180584
...
...
@@ -17,14 +17,25 @@
package
org.maxkey.persistence.service
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.maxkey.entity.apps.AppsSAML20Details
;
import
org.maxkey.persistence.mapper.AppsSaml20DetailsMapper
;
import
org.springframework.stereotype.Repository
;
import
com.github.benmanes.caffeine.cache.Cache
;
import
com.github.benmanes.caffeine.cache.Caffeine
;
@Repository
public
class
AppsSaml20DetailsService
extends
JpaBaseService
<
AppsSAML20Details
>{
protected
final
static
Cache
<
String
,
AppsSAML20Details
>
detailsCache
=
Caffeine
.
newBuilder
()
.
expireAfterWrite
(
30
,
TimeUnit
.
MINUTES
)
.
maximumSize
(
200000
)
.
build
();
public
AppsSaml20DetailsService
()
{
super
(
AppsSaml20DetailsMapper
.
class
);
}
...
...
@@ -37,7 +48,17 @@ public class AppsSaml20DetailsService extends JpaBaseService<AppsSAML20Details>
return
(
AppsSaml20DetailsMapper
)
super
.
getMapper
();
}
public
AppsSAML20Details
getAppDetails
(
String
id
){
return
getMapper
().
getAppDetails
(
id
);
public
AppsSAML20Details
getAppDetails
(
String
id
,
boolean
cached
){
AppsSAML20Details
details
=
null
;
if
(
cached
)
{
details
=
detailsCache
.
getIfPresent
(
id
);
if
(
details
==
null
)
{
details
=
getMapper
().
getAppDetails
(
id
);
detailsCache
.
put
(
id
,
details
);
}
}
else
{
details
=
getMapper
().
getAppDetails
(
id
);
}
return
details
;
}
}
maxkey-persistence/src/main/java/org/maxkey/persistence/service/AppsTokenBasedDetailsService.java
浏览文件 @
19180584
...
...
@@ -17,14 +17,25 @@
package
org.maxkey.persistence.service
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.mybatis.jpa.persistence.JpaBaseService
;
import
org.maxkey.entity.apps.AppsTokenBasedDetails
;
import
org.maxkey.persistence.mapper.AppsTokenBasedDetailsMapper
;
import
org.springframework.stereotype.Repository
;
import
com.github.benmanes.caffeine.cache.Cache
;
import
com.github.benmanes.caffeine.cache.Caffeine
;
@Repository
public
class
AppsTokenBasedDetailsService
extends
JpaBaseService
<
AppsTokenBasedDetails
>{
protected
final
static
Cache
<
String
,
AppsTokenBasedDetails
>
detailsCache
=
Caffeine
.
newBuilder
()
.
expireAfterWrite
(
30
,
TimeUnit
.
MINUTES
)
.
maximumSize
(
200000
)
.
build
();
public
AppsTokenBasedDetailsService
()
{
super
(
AppsTokenBasedDetailsMapper
.
class
);
}
...
...
@@ -37,7 +48,17 @@ public class AppsTokenBasedDetailsService extends JpaBaseService<AppsTokenBased
return
(
AppsTokenBasedDetailsMapper
)
super
.
getMapper
();
}
public
AppsTokenBasedDetails
getAppDetails
(
String
id
)
{
return
getMapper
().
getAppDetails
(
id
);
public
AppsTokenBasedDetails
getAppDetails
(
String
id
,
boolean
cached
)
{
AppsTokenBasedDetails
details
=
null
;
if
(
cached
)
{
details
=
detailsCache
.
getIfPresent
(
id
);
if
(
details
==
null
)
{
details
=
getMapper
().
getAppDetails
(
id
);
detailsCache
.
put
(
id
,
details
);
}
}
else
{
details
=
getMapper
().
getAppDetails
(
id
);
}
return
details
;
}
}
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasAuthorizeEndpoint.java
浏览文件 @
19180584
...
...
@@ -63,10 +63,9 @@ public class CasAuthorizeEndpoint extends CasBaseAuthorizeEndpoint{
HttpServletResponse
response
,
@RequestParam
(
value
=
CasConstants
.
PARAMETER
.
SERVICE
,
required
=
false
)
String
casService
){
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
casService
);
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
casService
,
true
);
return
buildCasModelAndView
(
request
,
response
,
casDetails
,
casService
);
}
@Operation
(
summary
=
"CAS页面跳转应用ID认证接口"
,
description
=
"传递参数应用ID"
,
method
=
"GET"
)
...
...
@@ -76,7 +75,7 @@ public class CasAuthorizeEndpoint extends CasBaseAuthorizeEndpoint{
HttpServletResponse
response
,
@PathVariable
(
"id"
)
String
id
){
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
id
);
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
id
,
true
);
return
buildCasModelAndView
(
request
,
response
,
casDetails
,
casDetails
.
getCallbackUrl
());
}
...
...
maxkey-protocols/maxkey-protocol-cas/src/main/java/org/maxkey/authz/cas/endpoint/CasRestV1Endpoint.java
浏览文件 @
19180584
...
...
@@ -91,8 +91,8 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
String
location
=
applicationConfig
.
getServerPrefix
()+
CasConstants
.
ENDPOINT
.
ENDPOINT_REST_TICKET_V1
+
"/"
+
ticket
;
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
add
(
"location"
,
location
);
_logger
.
trace
(
"ticket
"
+
ticket
);
_logger
.
trace
(
"location
"
+
location
);
_logger
.
trace
(
"ticket
{}"
,
ticket
);
_logger
.
trace
(
"location
{}"
,
location
);
return
new
ResponseEntity
<>(
"Location: "
+
location
,
headers
,
HttpStatus
.
CREATED
);
}
catch
(
final
AuthenticationException
e
)
{
...
...
@@ -121,10 +121,10 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
TicketGrantingTicketImpl
ticketGrantingTicketImpl
=
(
TicketGrantingTicketImpl
)
casTicketGrantingTicketServices
.
get
(
ticketGrantingTicket
);
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
casService
);
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
casService
,
true
);
ServiceTicketImpl
serviceTicket
=
new
ServiceTicketImpl
(
ticketGrantingTicketImpl
.
getAuthentication
(),
casDetails
);
String
ticket
=
ticketServices
.
createTicket
(
serviceTicket
);
String
ticket
=
ticketServices
.
createTicket
(
serviceTicket
);
return
new
ResponseEntity
<>(
ticket
,
HttpStatus
.
OK
);
}
catch
(
Exception
e
)
{
...
...
maxkey-protocols/maxkey-protocol-formbased/src/main/java/org/maxkey/authz/formbased/endpoint/FormBasedAuthorizeEndpoint.java
浏览文件 @
19180584
...
...
@@ -64,7 +64,7 @@ public class FormBasedAuthorizeEndpoint extends AuthorizeBaseEndpoint{
HttpServletRequest
request
,
@PathVariable
(
"id"
)
String
id
){
AppsFormBasedDetails
formBasedDetails
=
formBasedDetailsService
.
getAppDetails
(
id
);
AppsFormBasedDetails
formBasedDetails
=
formBasedDetailsService
.
getAppDetails
(
id
,
true
);
_logger
.
debug
(
"formBasedDetails {}"
,
formBasedDetails
);
Apps
application
=
getApp
(
id
);
formBasedDetails
.
setAdapter
(
application
.
getAdapter
());
...
...
maxkey-protocols/maxkey-protocol-jwt/src/main/java/org/maxkey/authz/token/endpoint/JwtAuthorizeEndpoint.java
浏览文件 @
19180584
...
...
@@ -79,7 +79,7 @@ public class JwtAuthorizeEndpoint extends AuthorizeBaseEndpoint{
@PathVariable
(
"id"
)
String
id
){
ModelAndView
modelAndView
=
new
ModelAndView
();
Apps
application
=
getApp
(
id
);
AppsJwtDetails
jwtDetails
=
jwtDetailsService
.
getAppDetails
(
id
);
AppsJwtDetails
jwtDetails
=
jwtDetailsService
.
getAppDetails
(
id
,
true
);
_logger
.
debug
(
""
+
jwtDetails
);
jwtDetails
.
setAdapter
(
application
.
getAdapter
());
jwtDetails
.
setIsAdapter
(
application
.
getIsAdapter
());
...
...
@@ -146,7 +146,7 @@ public class JwtAuthorizeEndpoint extends AuthorizeBaseEndpoint{
HttpServletResponse
response
,
@PathVariable
(
"appid"
)
String
appId
,
@PathVariable
(
"mediaType"
)
String
mediaType
)
{
AppsJwtDetails
jwtDetails
=
jwtDetailsService
.
getAppDetails
(
appId
);
AppsJwtDetails
jwtDetails
=
jwtDetailsService
.
getAppDetails
(
appId
,
true
);
if
(
jwtDetails
!=
null
)
{
String
jwkSetString
=
""
;
if
(!
jwtDetails
.
getSignature
().
equalsIgnoreCase
(
"none"
))
{
...
...
maxkey-protocols/maxkey-protocol-oauth-2.0/src/main/java/org/maxkey/authz/oauth2/provider/client/JdbcClientDetailsService.java
浏览文件 @
19180584
...
...
@@ -58,7 +58,7 @@ public class JdbcClientDetailsService implements ClientDetailsService, ClientReg
private
static
final
Log
logger
=
LogFactory
.
getLog
(
JdbcClientDetailsService
.
class
);
protected
final
static
Cache
<
String
,
ClientDetails
>
clientD
etailsCache
=
protected
final
static
Cache
<
String
,
ClientDetails
>
d
etailsCache
=
Caffeine
.
newBuilder
()
.
expireAfterWrite
(
30
,
TimeUnit
.
MINUTES
)
.
maximumSize
(
200000
)
...
...
@@ -127,19 +127,27 @@ public class JdbcClientDetailsService implements ClientDetailsService, ClientReg
public
ClientDetails
loadClientByClientId
(
String
clientId
,
boolean
cached
)
{
// cache in memory
ClientDetails
details
=
null
;
if
(
cached
)
{
details
=
clientDetailsCache
.
getIfPresent
(
clientId
);
}
if
(
details
==
null
)
{
try
{
details
=
jdbcTemplate
.
queryForObject
(
selectClientDetailsSql
,
new
ClientDetailsRowMapper
(),
clientId
);
if
(
cached
)
{
clientDetailsCache
.
put
(
clientId
,
details
);
}
}
catch
(
EmptyResultDataAccessException
e
)
{
throw
new
NoSuchClientException
(
"No client with requested id: "
+
clientId
);
}
ClientDetails
details
=
null
;
try
{
if
(
cached
)
{
details
=
detailsCache
.
getIfPresent
(
clientId
);
if
(
details
==
null
)
{
details
=
jdbcTemplate
.
queryForObject
(
selectClientDetailsSql
,
new
ClientDetailsRowMapper
(),
clientId
);
detailsCache
.
put
(
clientId
,
details
);
}
}
else
{
details
=
jdbcTemplate
.
queryForObject
(
selectClientDetailsSql
,
new
ClientDetailsRowMapper
(),
clientId
);
}
}
catch
(
EmptyResultDataAccessException
e
)
{
throw
new
NoSuchClientException
(
"No client with requested id: "
+
clientId
);
}
return
details
;
}
...
...
@@ -157,7 +165,7 @@ public class JdbcClientDetailsService implements ClientDetailsService, ClientReg
if
(
count
!=
1
)
{
throw
new
NoSuchClientException
(
"No client found with id = "
+
clientDetails
.
getClientId
());
}
clientD
etailsCache
.
invalidate
(
clientDetails
.
getClientId
());
d
etailsCache
.
invalidate
(
clientDetails
.
getClientId
());
}
public
void
updateClientSecret
(
String
clientId
,
String
secret
)
throws
NoSuchClientException
{
...
...
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/IdpInitEndpoint.java
浏览文件 @
19180584
...
...
@@ -92,7 +92,7 @@ public class IdpInitEndpoint {
HttpServletResponse
response
,
@PathVariable
(
"appid"
)
String
appId
)
throws
Exception
{
logger
.
debug
(
"SAML IDP init , app id is "
+
appId
);
AppsSAML20Details
saml20Details
=
saml20DetailsService
.
getAppDetails
(
appId
);
AppsSAML20Details
saml20Details
=
saml20DetailsService
.
getAppDetails
(
appId
,
true
);
WebContext
.
setAttribute
(
WebConstants
.
AUTHORIZE_SIGN_ON_APP
,
saml20Details
);
if
(
saml20Details
==
null
)
{
logger
.
error
(
"samlId["
+
appId
+
"] Error ."
);
...
...
maxkey-protocols/maxkey-protocol-saml-2.0/src/main/java/org/maxkey/authz/saml20/provider/endpoint/SingleSignOnEndpoint.java
浏览文件 @
19180584
...
...
@@ -113,7 +113,7 @@ public class SingleSignOnEndpoint {
}
public
void
extractSaml20Detail
(
ExtractBindingAdapter
extractBindingAdapter
,
String
samlId
)
throws
Exception
{
AppsSAML20Details
saml20Details
=
saml20DetailsService
.
getAppDetails
(
samlId
);
AppsSAML20Details
saml20Details
=
saml20DetailsService
.
getAppDetails
(
samlId
,
true
);
WebContext
.
setAttribute
(
WebConstants
.
AUTHORIZE_SIGN_ON_APP
,
saml20Details
);
if
(
saml20Details
==
null
)
{
logger
.
error
(
"Request SAML APPID ["
+
samlId
+
"] is not exist ."
);
...
...
maxkey-protocols/maxkey-protocol-tokenbased/src/main/java/org/maxkey/authz/token/endpoint/TokenBasedAuthorizeEndpoint.java
浏览文件 @
19180584
...
...
@@ -71,7 +71,7 @@ public class TokenBasedAuthorizeEndpoint extends AuthorizeBaseEndpoint{
AppsTokenBasedDetails
tokenBasedDetails
=
null
;
tokenBasedDetails
=
tokenBasedDetailsService
.
getAppDetails
(
id
);
tokenBasedDetails
=
tokenBasedDetailsService
.
getAppDetails
(
id
,
true
);
_logger
.
debug
(
""
+
tokenBasedDetails
);
Apps
application
=
getApp
(
id
);
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/jobs/AccountsStrategyJob.java
浏览文件 @
19180584
...
...
@@ -46,11 +46,11 @@ public class AccountsStrategyJob implements Job , Serializable {
@Override
public
void
execute
(
JobExecutionContext
context
){
if
(
jobStatus
==
JOBSTATUS
.
RUNNING
)
{
_logger
.
info
(
"
DynamicGroupsJ
ob is in running . "
);
_logger
.
info
(
"
Accounts Strategy j
ob is in running . "
);
return
;
}
_logger
.
debug
(
"
DynamicGroupsJ
ob is running ... "
);
_logger
.
debug
(
"
Accounts Strategy j
ob is running ... "
);
jobStatus
=
JOBSTATUS
.
RUNNING
;
try
{
if
(
accountsService
==
null
)
{
...
...
@@ -58,15 +58,16 @@ public class AccountsStrategyJob implements Job , Serializable {
(
AccountsService
)
context
.
getMergedJobDataMap
().
get
(
"service"
);
}
else
{
accountsService
.
refreshAllByStrategy
();
Thread
.
sleep
(
10
*
1000
);
//10 minutes
Thread
.
sleep
(
10
*
1000
);
}
_logger
.
debug
(
"
DynamicGroupsJ
ob is success "
);
_logger
.
debug
(
"
Accounts Strategy j
ob is success "
);
}
catch
(
Exception
e
)
{
_logger
.
error
(
"Exception "
,
e
);
jobStatus
=
JOBSTATUS
.
STOP
;
}
jobStatus
=
JOBSTATUS
.
FINISHED
;
_logger
.
debug
(
"
DynamicGroupsJ
ob is finished . "
);
_logger
.
debug
(
"
Accounts Strategy j
ob is finished . "
);
}
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/CasDetailsController.java
浏览文件 @
19180584
...
...
@@ -74,7 +74,7 @@ public class CasDetailsController extends BaseAppContorller {
@RequestMapping
(
value
=
{
"/forwardUpdate/{id}"
})
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"apps/cas/appUpdate"
);
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
id
);
AppsCasDetails
casDetails
=
casDetailsService
.
getAppDetails
(
id
,
false
);
super
.
decoderSecret
(
casDetails
);
WebContext
.
setAttribute
(
casDetails
.
getId
(),
casDetails
.
getIcon
());
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/FormBasedDetailsController.java
浏览文件 @
19180584
...
...
@@ -77,7 +77,7 @@ public class FormBasedDetailsController extends BaseAppContorller {
@RequestMapping
(
value
=
{
"/forwardUpdate/{id}"
})
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"apps/formbased/appUpdate"
);
AppsFormBasedDetails
formBasedDetails
=
formBasedDetailsService
.
getAppDetails
(
id
);
AppsFormBasedDetails
formBasedDetails
=
formBasedDetailsService
.
getAppDetails
(
id
,
false
);
decoderSecret
(
formBasedDetails
);
decoderSharedPassword
(
formBasedDetails
);
WebContext
.
setAttribute
(
formBasedDetails
.
getId
(),
formBasedDetails
.
getIcon
());
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/JwtDetailsController.java
浏览文件 @
19180584
...
...
@@ -77,7 +77,7 @@ public class JwtDetailsController extends BaseAppContorller {
@RequestMapping
(
value
=
{
"/forwardUpdate/{id}"
})
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"apps/jwt/appUpdate"
);
AppsJwtDetails
jwtDetails
=
jwtDetailsService
.
getAppDetails
(
id
);
AppsJwtDetails
jwtDetails
=
jwtDetailsService
.
getAppDetails
(
id
,
false
);
decoderSecret
(
jwtDetails
);
WebContext
.
setAttribute
(
jwtDetails
.
getId
(),
jwtDetails
.
getIcon
());
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/SAML20DetailsController.java
浏览文件 @
19180584
...
...
@@ -104,7 +104,7 @@ public class SAML20DetailsController extends BaseAppContorller {
@RequestMapping
(
value
=
{
"/forwardUpdate/{id}"
})
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"apps/saml20/appUpdate"
);
AppsSAML20Details
saml20Details
=
saml20DetailsService
.
getAppDetails
(
id
);
AppsSAML20Details
saml20Details
=
saml20DetailsService
.
getAppDetails
(
id
,
false
);
decoderSecret
(
saml20Details
);
WebContext
.
setAttribute
(
saml20Details
.
getId
(),
saml20Details
.
getIcon
());
modelAndView
.
addObject
(
"model"
,
saml20Details
);
...
...
maxkey-webs/maxkey-web-mgt/src/main/java/org/maxkey/web/apps/contorller/TokenBasedDetailsController.java
浏览文件 @
19180584
...
...
@@ -79,7 +79,7 @@ public class TokenBasedDetailsController extends BaseAppContorller {
@RequestMapping
(
value
=
{
"/forwardUpdate/{id}"
})
public
ModelAndView
forwardUpdate
(
@PathVariable
(
"id"
)
String
id
)
{
ModelAndView
modelAndView
=
new
ModelAndView
(
"apps/tokenbased/appUpdate"
);
AppsTokenBasedDetails
tokenBasedDetails
=
tokenBasedDetailsService
.
getAppDetails
(
id
);
AppsTokenBasedDetails
tokenBasedDetails
=
tokenBasedDetailsService
.
getAppDetails
(
id
,
false
);
decoderSecret
(
tokenBasedDetails
);
String
algorithmKey
=
passwordReciprocal
.
decoder
(
tokenBasedDetails
.
getAlgorithmKey
());
tokenBasedDetails
.
setAlgorithmKey
(
algorithmKey
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录