Skip to content

Commit

Permalink
docs: polish secret key implementation description (#4897)
Browse files Browse the repository at this point in the history
* docs: polish secret key implementation description

* docs: add en docs

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Jason Song <nobodyiam@gmail.com>
  • Loading branch information
nisiyong and nobodyiam authored Jun 7, 2023
1 parent 971b412 commit 8f0331f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/en/usage/other-language-client-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Header information to be set.

| Header | Value | Remarks |
| ------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| Authorization | Apollo ${appId}:${signature} | appId: the appId of the application, signature: the current time and the URL visited using the access key after the value of the signature, the specific implementation can be found in [Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Authorization | Apollo ${appId}:${signature} | appId: The appId of the application, signature: Generate a signature by combining the access key with the current timestamp in milliseconds, as well as the path and query components of the visited URL. The specific implementation can be found in [Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Timestamp | Number of milliseconds elapsed from `1970-1-1 00:00:00 UTC+0` to now | See [System.currentTimeMillis](https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()) |

## 1.6 Error Code Description
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/usage/other-language-client-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验

| Header | Value | 备注 |
|---------------|------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Authorization | Apollo ${appId}:${signature} | appId: 应用的appId,signature:使用访问密钥对当前时间以及所访问的URL加签后的值,具体实现可以参考[Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Authorization | Apollo ${appId}:${signature} | appId: 应用的appId,signature:使用访问密钥对当前时间毫秒值以及所访问的URL里的的path和query部分加签后的值,具体实现可以参考[Signature.signature](https://github.com/apolloconfig/apollo/blob/aa184a2e11d6e7e3f519d860d69f3cf30ccfcf9c/apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java#L22) |
| Timestamp |`1970-1-1 00:00:00 UTC+0`到现在所经过的毫秒数 | 可以参考[System.currentTimeMillis](https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()) |

## 1.6 错误码说明
Expand All @@ -181,4 +181,4 @@ Apollo从1.6.0版本开始增加访问密钥机制,从而只有经过身份验
接口访问的Method不正确,比如应该使用GET的接口使用了POST访问等,客户端需要检查接口访问方式是否正确。

### 1.6.5 500 - Internal Server Error
其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以尝试查看服务端日志来排查问题。
其它类型的错误默认都会返回500,对这类错误如果应用无法根据提示信息找到原因的话,可以尝试查看服务端日志来排查问题。

0 comments on commit 8f0331f

Please sign in to comment.