Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
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
youjj
cloud-platform
Commits
9996c05c
Commit
9996c05c
authored
Dec 21, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
验证码图片问题
parent
597862ec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
22 deletions
+8
-22
AuthController.java
...thub/wxiaoqi/security/auth/controller/AuthController.java
+3
-11
IUserService.java
.../com/github/wxiaoqi/security/auth/feign/IUserService.java
+1
-1
AuthService.java
...com/github/wxiaoqi/security/auth/service/AuthService.java
+1
-4
AppAuthServiceImpl.java
...xiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
+2
-5
AppUserRest.java
...va/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
+1
-1
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/controller/AuthController.java
View file @
9996c05c
...
@@ -5,22 +5,14 @@ import com.github.wxiaoqi.security.auth.service.AuthService;
...
@@ -5,22 +5,14 @@ import com.github.wxiaoqi.security.auth.service.AuthService;
import
com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest
;
import
com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest
;
import
com.github.wxiaoqi.security.common.constant.RequestTypeConstants
;
import
com.github.wxiaoqi.security.common.constant.RequestTypeConstants
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.ClientUtil
;
import
com.github.wxiaoqi.security.common.util.EntityUtils
;
import
com.github.wxiaoqi.security.common.util.IpUtil
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.result.JsonResultUtil
;
import
com.github.wxiaoqi.security.common.util.result.JsonResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -83,9 +75,9 @@ public class AuthController {
...
@@ -83,9 +75,9 @@ public class AuthController {
return
new
ObjectRestResponse
<>();
return
new
ObjectRestResponse
<>();
}
}
@RequestMapping
(
value
=
"/sendsms"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/sendsms"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
sendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
)
throws
Exception
{
public
JSONObject
sendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
String
pointList
)
throws
Exception
{
log
.
info
(
username
+
"----require sendsms..."
);
log
.
info
(
username
+
"----require sendsms..."
);
return
appAuthService
.
sendsms
(
username
,
type
);
return
appAuthService
.
sendsms
(
username
,
type
,
pointList
);
}
}
@RequestMapping
(
value
=
"/register"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/register"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
...
@@ -178,7 +170,7 @@ public class AuthController {
...
@@ -178,7 +170,7 @@ public class AuthController {
@RequestMapping
(
value
=
"other/sendsms"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"other/sendsms"
,
method
=
RequestMethod
.
GET
)
public
JSONObject
otherSendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
)
throws
Exception
{
public
JSONObject
otherSendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
)
throws
Exception
{
log
.
info
(
username
+
"----require sendsms..."
);
log
.
info
(
username
+
"----require sendsms..."
);
return
appAuthService
.
sendsms
(
username
,
type
);
return
appAuthService
.
sendsms
(
username
,
type
,
""
);
}
}
@RequestMapping
(
value
=
"/otherLogin"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/otherLogin"
,
method
=
RequestMethod
.
POST
)
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/feign/IUserService.java
View file @
9996c05c
...
@@ -29,7 +29,7 @@ public interface IUserService {
...
@@ -29,7 +29,7 @@ public interface IUserService {
AppUserInfo
AppValidate
(
@RequestBody
JwtAuthenticationRequest
authenticationRequest
);
AppUserInfo
AppValidate
(
@RequestBody
JwtAuthenticationRequest
authenticationRequest
);
@RequestMapping
(
value
=
"/api/app/user/sendsms"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/sendsms"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
sendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
);
public
JSONObject
sendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"pointList"
)
String
pointList
);
@RequestMapping
(
value
=
"/api/app/user/register"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/register"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
public
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/AuthService.java
View file @
9996c05c
...
@@ -4,16 +4,13 @@ package com.github.wxiaoqi.security.auth.service;
...
@@ -4,16 +4,13 @@ package com.github.wxiaoqi.security.auth.service;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest
;
import
com.github.wxiaoqi.security.auth.util.user.JwtAuthenticationRequest
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.servlet.http.HttpServletRequest
;
public
interface
AuthService
{
public
interface
AuthService
{
String
login
(
JwtAuthenticationRequest
authenticationRequest
)
throws
Exception
;
String
login
(
JwtAuthenticationRequest
authenticationRequest
)
throws
Exception
;
ObjectRestResponse
loginSmall
(
JwtAuthenticationRequest
authenticationRequest
)
throws
Exception
;
ObjectRestResponse
loginSmall
(
JwtAuthenticationRequest
authenticationRequest
)
throws
Exception
;
String
refresh
(
String
oldToken
)
throws
Exception
;
String
refresh
(
String
oldToken
)
throws
Exception
;
void
validate
(
String
token
)
throws
Exception
;
void
validate
(
String
token
)
throws
Exception
;
JSONObject
sendsms
(
String
username
,
Integer
type
)
throws
Exception
;
JSONObject
sendsms
(
String
username
,
Integer
type
,
String
pointList
)
throws
Exception
;
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
)
throws
Exception
;
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
)
throws
Exception
;
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
)
throws
Exception
;
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
)
throws
Exception
;
JSONObject
checkBindWechat
(
String
username
)
throws
Exception
;
JSONObject
checkBindWechat
(
String
username
)
throws
Exception
;
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
View file @
9996c05c
...
@@ -13,14 +13,11 @@ import com.github.wxiaoqi.security.common.constant.RequestTypeConstants;
...
@@ -13,14 +13,11 @@ import com.github.wxiaoqi.security.common.constant.RequestTypeConstants;
import
com.github.wxiaoqi.security.common.exception.auth.UserInvalidException
;
import
com.github.wxiaoqi.security.common.exception.auth.UserInvalidException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
io.swagger.models.auth.In
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
javax.servlet.http.HttpServletRequest
;
/**
/**
* @author keliii
* @author keliii
*/
*/
...
@@ -69,8 +66,8 @@ public class AppAuthServiceImpl implements AuthService {
...
@@ -69,8 +66,8 @@ public class AppAuthServiceImpl implements AuthService {
jwtTokenUtil
.
getInfoFromToken
(
token
);
jwtTokenUtil
.
getInfoFromToken
(
token
);
}
}
@Override
@Override
public
JSONObject
sendsms
(
String
username
,
Integer
type
)
throws
Exception
{
public
JSONObject
sendsms
(
String
username
,
Integer
type
,
String
pointList
)
throws
Exception
{
return
userService
.
sendsms
(
username
,
type
);
return
userService
.
sendsms
(
username
,
type
,
pointList
);
}
}
@Override
@Override
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
View file @
9996c05c
...
@@ -71,7 +71,7 @@ public class AppUserRest {
...
@@ -71,7 +71,7 @@ public class AppUserRest {
*/
*/
@RequestMapping
(
value
=
"/user/sendsms"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/user/sendsms"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
public
@ResponseBody
JSONObject
sendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
String
pointList
){
JSONObject
sendsms
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"pointList"
)
String
pointList
){
return
appPermissionService
.
sendSMS
(
username
,
type
,
pointList
);
return
appPermissionService
.
sendSMS
(
username
,
type
,
pointList
);
}
}
...
...
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