Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
86aedf75
Commit
86aedf75
authored
Oct 30, 2019
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更正名称
parent
2736f9ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
Constants.java
src/main/java/cn/quantgroup/xyqb/Constants.java
+1
-1
CaptchaFiniteValidateAdvisor.java
...oup/xyqb/aspect/captcha/CaptchaFiniteValidateAdvisor.java
+2
-2
UserController.java
...n/quantgroup/xyqb/controller/external/UserController.java
+5
-4
No files found.
src/main/java/cn/quantgroup/xyqb/Constants.java
View file @
86aedf75
...
...
@@ -49,7 +49,7 @@ public interface Constants {
String
CHECK_FAIL
=
"fail"
;
String
SPLIT_CHAR
=
":"
;
String
TOKEN_MASTER
=
"*"
;
String
PASSWORD
D
_HEADER
=
"Basic "
;
String
PASSWORD_HEADER
=
"Basic "
;
int
AUTHORIZE_HEADER_SIZE
=
2
;
String
PAGE_NEXT_KEY_XYQB
=
"xyqb"
;
/**
...
...
src/main/java/cn/quantgroup/xyqb/aspect/captcha/CaptchaFiniteValidateAdvisor.java
View file @
86aedf75
...
...
@@ -151,11 +151,11 @@ public class CaptchaFiniteValidateAdvisor {
*/
private
Map
<
String
,
String
>
getHeaderParam
(
HttpServletRequest
request
)
{
String
credential
=
request
.
getHeader
(
"authorization"
);
if
(
StringUtils
.
isBlank
(
credential
)
||
!
credential
.
startsWith
(
Constants
.
PASSWORD
D
_HEADER
))
{
if
(
StringUtils
.
isBlank
(
credential
)
||
!
credential
.
startsWith
(
Constants
.
PASSWORD_HEADER
))
{
LOGGER
.
info
(
"参数无效, credential:{}"
,
credential
);
return
null
;
}
credential
=
credential
.
substring
(
Constants
.
PASSWORD
D
_HEADER
.
length
());
credential
=
credential
.
substring
(
Constants
.
PASSWORD_HEADER
.
length
());
byte
[]
buf
=
Base64
.
decodeBase64
(
credential
);
credential
=
new
String
(
buf
,
Charset
.
forName
(
"UTF-8"
));
String
[]
credentialArr
=
credential
.
split
(
":"
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/external/UserController.java
View file @
86aedf75
...
...
@@ -166,8 +166,9 @@ public class UserController implements IBaseController {
HttpServletRequest
request
)
{
Map
<
String
,
JsonResult
>
validMap
=
getHeaderParam
(
request
);
log
.
info
(
"login/fast -> channelId:{},appChannel:{},createdFrom:{},btRegisterChannelId:{},key:{},dimension:{},clickId:{}"
,
channelId
,
appChannel
,
createdFrom
,
btRegisterChannelId
,
key
,
dimension
,
clickId
);
if
(
null
!=
validMap
.
get
(
Constants
.
CHECK_FAIL
))
{
return
validMap
.
get
(
Constants
.
CHECK_FAIL
);
JsonResult
failResult
=
validMap
.
get
(
Constants
.
CHECK_FAIL
);
if
(
null
!=
failResult
)
{
return
failResult
;
}
Merchant
merchant
=
merchantService
.
findMerchantByName
(
key
);
if
(
merchant
==
null
)
{
...
...
@@ -463,10 +464,10 @@ public class UserController implements IBaseController {
private
User
verificateUserNameAndPassword
(
HttpServletRequest
request
)
{
String
credential
=
request
.
getHeader
(
"authorization"
);
if
(
StringUtils
.
isBlank
(
credential
)
||
!
credential
.
startsWith
(
Constants
.
PASSWORD
D
_HEADER
))
{
if
(
StringUtils
.
isBlank
(
credential
)
||
!
credential
.
startsWith
(
Constants
.
PASSWORD_HEADER
))
{
return
null
;
}
credential
=
credential
.
substring
(
Constants
.
PASSWORD
D
_HEADER
.
length
());
credential
=
credential
.
substring
(
Constants
.
PASSWORD_HEADER
.
length
());
byte
[]
buf
=
Base64
.
decodeBase64
(
credential
);
String
bufStr
=
""
;
try
{
...
...
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