Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
Details
Activity
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
station
YeeAmosFireAutoSysRoot
Commits
78c1b9b2
Commit
78c1b9b2
authored
Jul 27, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
4f094b72
c920d9c1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
86 deletions
+0
-86
AvoidLoginController.java
...in/amos/fas/business/controller/AvoidLoginController.java
+0
-48
RemoteSecurityService.java
...eejoin/amos/fas/business/feign/RemoteSecurityService.java
+0
-29
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+0
-3
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+0
-3
application-test.properties
...toSysStart/src/main/resources/application-test.properties
+0
-3
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/AvoidLoginController.java
deleted
100644 → 0
View file @
4f094b72
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @Author: xinglei
* @Description:
* @Date: 2020/5/27 15:26
*/
@RestController
@RequestMapping
(
"/api/login"
)
@Api
(
"免密登录api"
)
public
class
AvoidLoginController
extends
BaseController
{
@Value
(
"${oauth2.accessToken}"
)
private
String
checkAccessToken
;
@Value
(
"${oauth2.password}"
)
private
String
password
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"免密登录获取token"
,
notes
=
"免密登录获取token"
)
@RequestMapping
(
value
=
"/avoid/{loginId}/{accessToken}/{expireTime}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
avoidLogin
(
@PathVariable
String
loginId
,
@PathVariable
String
accessToken
,
@PathVariable
Integer
expireTime
)
{
if
(
accessToken
.
equals
(
checkAccessToken
)){
Toke
toke
=
remoteSecurityService
.
avoidLogin
(
loginId
,
password
,
expireTime
);
return
CommonResponseUtil
.
success
(
toke
);
}
return
CommonResponseUtil
.
failure
(
"令牌不正确"
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/RemoteSecurityService.java
View file @
78c1b9b2
...
...
@@ -166,35 +166,6 @@ public class RemoteSecurityService {
return
oked
;
}
/**
* 免密登录
* @return
*/
public
Toke
avoidLogin
(
String
loginId
,
String
password
,
Integer
expireTime
){
StationAuthModel
stationAuthModel
=
new
StationAuthModel
();
stationAuthModel
.
setLoginId
(
loginId
);
stationAuthModel
.
setPassword
(
password
);
stationAuthModel
.
setExpireTime
(
expireTime
);
Map
map
=
null
;
FeignClientResult
feignClientResult
;
Toke
oked
=
new
Toke
();
try
{
RequestContext
.
setProduct
(
productWeb
);
feignClientResult
=
Privilege
.
authClient
.
idpasswordStation
(
stationAuthModel
);
//Privilege.authClient.idpasswordStation();
map
=
(
Map
)
feignClientResult
.
getResult
();
if
(
map
!=
null
){
oked
.
setToke
(
map
.
get
(
"token"
).
toString
());
oked
.
setProduct
(
productWeb
);
oked
.
setAppKey
(
appKeyWeb
);
}
}
catch
(
InnerInvokException
e
)
{
e
.
printStackTrace
();
}
return
oked
;
}
/* public List<UserModel> listUserByRoleIds(String roleIds) {
CommonResponse commonResponse = iAmosSecurityServer.listUserByRoleIds(roleIds);
return handleArray(commonResponse, UserModel.class);
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
78c1b9b2
...
...
@@ -2,9 +2,6 @@ security.password=tw123456
security.loginId
=
tw3
security.productWeb
=
CONVERTER_STATION_WEB
security.appKeyWeb
=
CONVERTER_STATION
oauth2.accessToken
=
my
oauth2.password
=
a1234560
#environment
#spring.profiles.active = dev
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
78c1b9b2
...
...
@@ -2,9 +2,6 @@ security.password=tw123456
security.loginId
=
tw3
security.productWeb
=
CONVERTER_STATION_WEB
security.appKeyWeb
=
CONVERTER_STATION
oauth2.accessToken
=
my
oauth2.password
=
a123456
#environment
#spring.profiles.active = dev
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-test.properties
View file @
78c1b9b2
...
...
@@ -2,9 +2,6 @@ security.password=tw123456
security.loginId
=
tw3
security.productWeb
=
CONVERTER_STATION_WEB
security.appKeyWeb
=
CONVERTER_STATION
oauth2.accessToken
=
my
oauth2.password
=
a123456
#environment
#spring.profiles.active = dev
...
...
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