Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
6f69aab4
Commit
6f69aab4
authored
Jul 03, 2024
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
34b0b089
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
1 deletion
+56
-1
pom.xml
ace-auth/ace-auth-server/pom.xml
+18
-0
AuthController.java
...thub/wxiaoqi/security/auth/controller/AuthController.java
+36
-0
AdminGaindataController.java
...atform/rs/website/controller/AdminGaindataController.java
+2
-1
No files found.
ace-auth/ace-auth-server/pom.xml
View file @
6f69aab4
...
...
@@ -12,6 +12,24 @@
<artifactId>
ace-auth-server
</artifactId>
<dependencies>
<!-- maxkey -->
<dependency>
<groupId>
maxkey
</groupId>
<artifactId>
maxkey-client-sdk
</artifactId>
<version>
3.0.0.RELEASE
</version>
<type>
jar
</type>
</dependency>
<dependency>
<groupId>
com.nimbusds
</groupId>
<artifactId>
nimbus-jose-jwt
</artifactId>
<version>
8.10
</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>maxkey</groupId>-->
<!-- <artifactId>maxkey-client-sdk</artifactId>-->
<!-- <version>0.0.1</version>-->
<!-- </dependency>-->
<!-- swagger -->
<dependency>
<groupId>
com.spring4all
</groupId>
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/controller/AuthController.java
View file @
6f69aab4
package
com
.
github
.
wxiaoqi
.
security
.
auth
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.connsec.client.utils.PathUtils
;
import
com.github.wxiaoqi.security.auth.service.AuthService
;
import
com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest
;
import
com.github.wxiaoqi.security.common.constant.RequestTypeConstants
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.result.JsonResultUtil
;
import
com.nimbusds.jose.crypto.RSASSAVerifier
;
import
com.nimbusds.jose.jwk.JWKSet
;
import
com.nimbusds.jwt.JWTClaimsSet
;
import
com.nimbusds.jwt.SignedJWT
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
//import org.maxkey.client.utils.PathUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.io.File
;
import
java.security.interfaces.RSAKey
;
import
java.util.Map
;
@Api
(
tags
=
"用户登录"
)
...
...
@@ -52,6 +60,34 @@ public class AuthController {
return
new
ObjectRestResponse
<
String
>().
data
(
token
);
}
// @RequestMapping(value = "tokenMaxkey", method = RequestMethod.POST)
// public ObjectRestResponse<String> createAuthenticationTokenMaxkey(
// @RequestBody JwtAuthenticationRequest authenticationRequest,
// HttpServletRequest request) throws Exception {
// String path = request.getContextPath();
// String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
// String token=request.getParameter("jwt");
// System.out.println("jwt "+token);
// SignedJWT signedJWT=null;
//
// //JWKSetKeyStore jwkSetKeyStore=new JWKSetKeyStore();
//
// File jwksFile=new File(PathUtils.getInstance().getClassPath()+"jwk.jwks");
// JWKSet jwkSet= JWKSet.load(jwksFile);
//
// RSASSAVerifier rsaSSAVerifier = new RSASSAVerifier(((RSAKey) jwkSet.getKeyByKeyId("maxkey_rsa")).toRSAPublicKey());
// try {
//
// signedJWT = SignedJWT.parse(token);
// } catch (java.text.ParseException e) {
// // Invalid signed JWT encoding
// }
//
// System.out.println("signedJWT "+signedJWT);
// JWTClaimsSet jwtClaims =signedJWT.getJWTClaimsSet();
// return new ObjectRestResponse<String>().data("");
// }
@RequestMapping
(
value
=
"token/small"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
<
String
>
createAuthenticationTokenSmall
(
@RequestBody
JwtAuthenticationRequest
authenticationRequest
,
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/AdminGaindataController.java
View file @
6f69aab4
...
...
@@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
...
...
@@ -210,7 +211,7 @@ public class AdminGaindataController extends BaseController<GainDataBiz, GainDat
baseBiz
.
handleDataNum
(
dataMenuMap
,
dataMenuMap
.
get
(
gainDataVO
.
getMenuId
()));
}
}
List
<
GainDataBiz
.
DataMenuStats
>
dataMenuStats
=
(
List
)
dataMenuMap
.
values
(
);
List
<
GainDataBiz
.
DataMenuStats
>
dataMenuStats
=
CollUtil
.
newArrayList
(
dataMenuMap
.
values
()
);
return
ObjectRestResponse
.
succ
(
dataMenuBiz
.
getImageMenuStatsTree
(
dataMenuStats
,
AdminCommonConstant
.
ROOT
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment