You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by to...@apache.org on 2021/03/24 01:05:24 UTC

[apisix] branch master updated: chore: sort imports in the Markdown examples (#3822)

This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new a2b69b1  chore: sort imports in the Markdown examples (#3822)
a2b69b1 is described below

commit a2b69b15306a755885c912cbb233f10a116e375d
Author: John Bampton <jb...@users.noreply.github.com>
AuthorDate: Wed Mar 24 11:05:14 2021 +1000

    chore: sort imports in the Markdown examples (#3822)
---
 docs/en/latest/examples/plugins-hmac-auth-generate-signature.md | 6 +++---
 docs/en/latest/plugins/hmac-auth.md                             | 2 +-
 docs/zh/latest/plugins/hmac-auth.md                             | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docs/en/latest/examples/plugins-hmac-auth-generate-signature.md b/docs/en/latest/examples/plugins-hmac-auth-generate-signature.md
index 136be27..9eaba73 100644
--- a/docs/en/latest/examples/plugins-hmac-auth-generate-signature.md
+++ b/docs/en/latest/examples/plugins-hmac-auth-generate-signature.md
@@ -24,9 +24,9 @@ title: HMAC Generate Signature Examples
 ## Python 3
 
 ```python
+import base64
 import hashlib
 import hmac
-import base64
 
 secret = bytes('the shared secret key here', 'utf-8')
 message = bytes('this is signature string', 'utf-8')
@@ -46,8 +46,8 @@ base64.b64encode(hash.digest())
 ```java
 import javax.crypto.Mac;
 import javax.crypto.spec.SecretKeySpec;
-import java.security.NoSuchAlgorithmException;
 import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
 import javax.xml.bind.DatatypeConverter;
 
 class Main {
@@ -103,8 +103,8 @@ func main() {
 ## Ruby
 
 ```ruby
-require 'openssl'
 require 'base64'
+require 'openssl'
 
 secret = 'the shared secret key here'
 message = 'this is signature string'
diff --git a/docs/en/latest/plugins/hmac-auth.md b/docs/en/latest/plugins/hmac-auth.md
index 591179a..6688ab9 100644
--- a/docs/en/latest/plugins/hmac-auth.md
+++ b/docs/en/latest/plugins/hmac-auth.md
@@ -168,9 +168,9 @@ Note: The last request header also needs + `\n`.
 Use Python to generate the signature `SIGNATURE`:
 
 ```python
+import base64
 import hashlib
 import hmac
-import base64
 
 secret = bytes('my-secret-key', 'utf-8')
 message = bytes("""GET
diff --git a/docs/zh/latest/plugins/hmac-auth.md b/docs/zh/latest/plugins/hmac-auth.md
index 3b3bbb1..cb02d94 100644
--- a/docs/zh/latest/plugins/hmac-auth.md
+++ b/docs/zh/latest/plugins/hmac-auth.md
@@ -162,9 +162,9 @@ x-custom-a:test
 使用 Python 来生成签名 `SIGNATURE`:
 
 ```python
+import base64
 import hashlib
 import hmac
-import base64
 
 secret = bytes('my-secret-key', 'utf-8')
 message = bytes("""GET