Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
66cb87d0
Commit
66cb87d0
authored
May 23, 2022
by
罗长华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整SDK签名参数
parent
938a1950
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletions
+7
-1
framework/src/main/java/io/geekidea/springbootplus/framework/shiro/signature/SignUtils.java
+4
-0
im-sdk/src/main/java/com/wecloud/im/sdk/internal/SignUtils.java
+2
-0
im-sdk/src/main/java/com/wecloud/im/sdk/utils/HttpHeaders.java
+1
-1
No files found.
framework/src/main/java/io/geekidea/springbootplus/framework/shiro/signature/SignUtils.java
View file @
66cb87d0
...
@@ -22,6 +22,8 @@ public class SignUtils {
...
@@ -22,6 +22,8 @@ public class SignUtils {
public
static
final
String
CONTENT_TYPE
=
"Content-Type"
;
public
static
final
String
CONTENT_TYPE
=
"Content-Type"
;
public
static
final
String
DATE
=
"Date"
;
public
static
final
String
NEW_LINE
=
"\n"
;
public
static
final
String
NEW_LINE
=
"\n"
;
public
static
String
buildCanonicalString
(
String
method
,
String
resourcePath
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
parameters
)
{
public
static
String
buildCanonicalString
(
String
method
,
String
resourcePath
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
parameters
)
{
...
@@ -37,6 +39,8 @@ public class SignUtils {
...
@@ -37,6 +39,8 @@ public class SignUtils {
String
lowerKey
=
header
.
getKey
().
toLowerCase
();
String
lowerKey
=
header
.
getKey
().
toLowerCase
();
if
(
lowerKey
.
equals
(
CONTENT_TYPE
.
toLowerCase
()))
{
if
(
lowerKey
.
equals
(
CONTENT_TYPE
.
toLowerCase
()))
{
fixedHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
fixedHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
}
else
if
(
lowerKey
.
equals
(
DATE
.
toLowerCase
()))
{
fixedHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
}
else
if
(
lowerKey
.
startsWith
(
IM_PREFIX
))
{
}
else
if
(
lowerKey
.
startsWith
(
IM_PREFIX
))
{
canonicalizedImHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
canonicalizedImHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
}
}
...
...
im-sdk/src/main/java/com/wecloud/im/sdk/internal/SignUtils.java
View file @
66cb87d0
...
@@ -45,6 +45,8 @@ public class SignUtils {
...
@@ -45,6 +45,8 @@ public class SignUtils {
String
lowerKey
=
header
.
getKey
().
toLowerCase
();
String
lowerKey
=
header
.
getKey
().
toLowerCase
();
if
(
lowerKey
.
equals
(
HttpHeaders
.
CONTENT_TYPE
.
toLowerCase
()))
{
if
(
lowerKey
.
equals
(
HttpHeaders
.
CONTENT_TYPE
.
toLowerCase
()))
{
fixedHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
fixedHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
}
else
if
(
lowerKey
.
equals
(
HttpHeaders
.
DATE
.
toLowerCase
()))
{
fixedHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
}
else
if
(
lowerKey
.
startsWith
(
IM_PREFIX
))
{
}
else
if
(
lowerKey
.
startsWith
(
IM_PREFIX
))
{
canonicalizedImHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
canonicalizedImHeadersToSign
.
put
(
lowerKey
,
header
.
getValue
().
trim
());
}
}
...
...
im-sdk/src/main/java/com/wecloud/im/sdk/utils/HttpHeaders.java
View file @
66cb87d0
...
@@ -16,7 +16,7 @@ public interface HttpHeaders {
...
@@ -16,7 +16,7 @@ public interface HttpHeaders {
public
static
final
String
CONTENT_MD5
=
"Content-MD5"
;
public
static
final
String
CONTENT_MD5
=
"Content-MD5"
;
public
static
final
String
CONTENT_TYPE
=
"Content-Type"
;
public
static
final
String
CONTENT_TYPE
=
"Content-Type"
;
public
static
final
String
TRANSFER_ENCODING
=
"Transfer-Encoding"
;
public
static
final
String
TRANSFER_ENCODING
=
"Transfer-Encoding"
;
public
static
final
String
DATE
=
"
x-im-
Date"
;
public
static
final
String
DATE
=
"Date"
;
public
static
final
String
ETAG
=
"ETag"
;
public
static
final
String
ETAG
=
"ETag"
;
public
static
final
String
EXPIRES
=
"Expires"
;
public
static
final
String
EXPIRES
=
"Expires"
;
public
static
final
String
HOST
=
"Host"
;
public
static
final
String
HOST
=
"Host"
;
...
...
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