Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MaxKey单点登录官方(MaxKeyTop)
MaxKey
提交
1140dc1d
MaxKey
项目概览
MaxKey单点登录官方(MaxKeyTop)
/
MaxKey
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
1140dc1d
编写于
12月 25, 2021
作者:
M
MaxKey
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
slf4j
上级
14fb79ab
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
12 addition
and
9 deletion
+12
-9
maxkey-common/src/main/java/org/maxkey/crypto/jwt/encryption/service/impl/RecipientJwtEncryptionAndDecryptionServiceBuilder.java
...pl/RecipientJwtEncryptionAndDecryptionServiceBuilder.java
+6
-4
maxkey-common/src/main/java/org/maxkey/crypto/jwt/signer/service/impl/SymmetricSigningAndValidationServiceBuilder.java
...ice/impl/SymmetricSigningAndValidationServiceBuilder.java
+6
-5
未找到文件。
maxkey-common/src/main/java/org/maxkey/crypto/jwt/encryption/service/impl/RecipientJwtEncryptionAndDecryptionServiceBuilder.java
浏览文件 @
1140dc1d
...
...
@@ -23,9 +23,11 @@ package org.maxkey.crypto.jwt.encryption.service.impl;
import
java.security.NoSuchAlgorithmException
;
import
java.security.spec.InvalidKeySpecException
;
import
java.text.ParseException
;
import
org.apache.log4j.Logger
;
import
org.maxkey.crypto.jose.keystore.JWKSetKeyStore
;
import
org.maxkey.crypto.jwt.encryption.service.JwtEncryptionAndDecryptionService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
com.nimbusds.jose.JOSEException
;
import
com.nimbusds.jose.jwk.JWKSet
;
...
...
@@ -34,7 +36,7 @@ import com.nimbusds.jose.jwk.JWKSet;
*
*/
public
class
RecipientJwtEncryptionAndDecryptionServiceBuilder
{
final
static
Logger
logger
=
Logger
.
getLogger
(
RecipientJwtEncryptionAndDecryptionServiceBuilder
.
class
);
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
RecipientJwtEncryptionAndDecryptionServiceBuilder
.
class
);
//private HttpClient httpClient = HttpClientBuilder.create().useSystemProperties().build();
//private HttpComponentsClientHttpRequestFactory httpFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
...
...
@@ -49,11 +51,11 @@ public class RecipientJwtEncryptionAndDecryptionServiceBuilder {
public
JwtEncryptionAndDecryptionService
serviceBuilder
(
String
jwksUri
){
logger
.
debug
(
"jwksUri : "
+
jwksUri
);
_logger
.
debug
(
"jwksUri : {}"
,
jwksUri
);
String
jsonString
=
""
;
//= restTemplate.getForObject(jwksUri, String.class);
logger
.
debug
(
"jwks json String : "
+
jsonString
);
_logger
.
debug
(
"jwks json String : {}"
,
jsonString
);
JwtEncryptionAndDecryptionService
recipientJwtEncryptionAndDecryptionService
;
try
{
JWKSet
jwkSet
=
JWKSet
.
parse
(
jsonString
);
...
...
maxkey-common/src/main/java/org/maxkey/crypto/jwt/signer/service/impl/SymmetricSigningAndValidationServiceBuilder.java
浏览文件 @
1140dc1d
...
...
@@ -24,8 +24,9 @@ import java.security.NoSuchAlgorithmException;
import
java.security.spec.InvalidKeySpecException
;
import
java.util.Map
;
import
org.apache.log4j.Logger
;
import
org.maxkey.crypto.jwt.signer.service.JwtSigningAndValidationService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
com.google.common.collect.ImmutableMap
;
import
com.nimbusds.jose.JOSEException
;
...
...
@@ -36,7 +37,7 @@ import com.nimbusds.jose.jwk.JWK;
* Builder Symmetric Signing Service
*/
public
class
SymmetricSigningAndValidationServiceBuilder
{
final
static
Logger
logger
=
Logger
.
getLogger
(
SymmetricSigningAndValidationServiceBuilder
.
class
);
final
static
Logger
_logger
=
LoggerFactory
.
getLogger
(
SymmetricSigningAndValidationServiceBuilder
.
class
);
public
static
final
String
SYMMETRIC_KEY
=
"SYMMETRIC-KEY"
;
/**
*
...
...
@@ -46,10 +47,10 @@ public class SymmetricSigningAndValidationServiceBuilder {
}
public
JwtSigningAndValidationService
serviceBuilder
(
String
sharedSecret
){
logger
.
debug
(
"shared Secret : "
+
sharedSecret
);
logger
.
debug
(
"Symmetric Id : "
+
SYMMETRIC_KEY
);
_logger
.
debug
(
"shared Secret : {}"
,
sharedSecret
);
_logger
.
debug
(
"Symmetric Id : {}"
,
SYMMETRIC_KEY
);
if
(
sharedSecret
==
null
)
{
logger
.
error
(
"Couldn't create symmetric SigningAndValidation"
);
_
logger
.
error
(
"Couldn't create symmetric SigningAndValidation"
);
return
null
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录