Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-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
马博
test-platform
Commits
b71cf568
Commit
b71cf568
authored
Dec 06, 2018
by
赵然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zr' into develop
parents
aa75e8dc
4c0cfd3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
14 deletions
+22
-14
Authorization.java
src/test/java/http/service/Authorization.java
+22
-14
No files found.
src/test/java/http/service/Authorization.java
View file @
b71cf568
...
...
@@ -55,6 +55,7 @@ public class Authorization {
private
static
Map
<
String
,
String
>
hdCookies
;
private
static
Map
<
String
,
String
>
hdCookiesMabo
;
private
static
Map
<
String
,
String
>
hdCookiesSaas
;
private
static
Map
<
String
,
Map
>
hdCookiesSaasByApp
=
new
ConcurrentHashMap
<>();
private
static
Map
<
String
,
Map
>
hdCookiesCommon
=
new
ConcurrentHashMap
<>();
private
static
Map
<
String
,
String
>
openbsCookies
;
private
Map
<
String
,
String
>
ssoCookies
=
null
;
...
...
@@ -247,7 +248,9 @@ public class Authorization {
}
public
Map
hdLoginSaas
(
String
appId
){
int
i
=
10
;
Map
<
String
,
String
>
hdCookies
=
hdCookiesSaasByApp
.
get
(
appId
);
while
((
hdCookies
==
null
||
hdCookies
.
size
()==
0
)&&
i
>
0
)
{
Response
token
=
this
.
hdGetToken
();
String
url
=
PROTOCOL
+
hdHost
+
hdLoginPath
;
Map
<
String
,
String
>
cookies
=
token
.
getCookies
();
...
...
@@ -257,12 +260,17 @@ public class Authorization {
paras
.
put
(
"redirect"
,
"/redirectApp"
);
paras
.
put
(
"isAutoLogin"
,
"true"
);
Response
response
=
given
().
cookies
(
cookies
).
params
(
paras
).
post
(
url
);
Map
<
String
,
String
>
hdCookiesSaasByApp
=
new
HashMap
<>(
response
.
getCookies
());
hdCookies
=
new
HashMap
<>(
response
.
getCookies
());
//取消安全校验
hdCookiesSaasByApp
.
remove
(
"csrf_token"
);
hdCookiesSaasByApp
.
put
(
"appId"
,
appId
);
return
hdCookiesSaasByApp
;
hdCookies
.
remove
(
"csrf_token"
);
hdCookies
.
put
(
"appId"
,
appId
);
hdCookies
.
put
(
"duibaAppId"
,
appId
);
hdCookiesSaasByApp
.
put
(
appId
,
hdCookies
);
i
--;
}
return
hdCookies
;
}
//密码为duibaduiba123
public
Map
hdLoginCommon
(
String
email
){
...
...
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