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

wusheng pushed a commit to branch feature/token-auth
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git

commit c703e36928be2cb711a14aa4ad07a5f87d851e59
Author: wu-sheng <[email protected]>
AuthorDate: Fri Mar 30 09:16:58 2018 +0800

    Revert "Update AuthenticationActivator.java"
    
    This reverts commit 0935f18fd6802ab84c12e0609c21ef753ff51be3.
---
 .../skywalking/apm/agent/core/remote/AuthenticationActivator.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AuthenticationActivator.java
 
b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AuthenticationActivator.java
index 2339da7..ddb61ac 100644
--- 
a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AuthenticationActivator.java
+++ 
b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/AuthenticationActivator.java
@@ -28,6 +28,8 @@ import org.apache.skywalking.apm.util.StringUtil;
  * @author wu-sheng
  */
 public class AuthenticationActivator {
+    private static final Metadata.Key<String> AUTH_HEAD_HEADER_NAME =
+            Metadata.Key.of("Authentication", 
Metadata.ASCII_STRING_MARSHALLER);
 
     public static Channel build(ManagedChannel originChannel) {
         if (StringUtil.isEmpty(Config.Agent.AUTHENTICATION)) {
@@ -41,7 +43,7 @@ public class AuthenticationActivator {
                 return new 
ForwardingClientCall.SimpleForwardingClientCall<REQ, 
RESP>(channel.newCall(method, options)) {
                     @Override
                     public void start(Listener<RESP> responseListener, 
Metadata headers) {
-                        headers.put(Metadata.Key.of("Authentication", 
Metadata.ASCII_STRING_MARSHALLER), Config.Agent.AUTHENTICATION);
+                        headers.put(AUTH_HEAD_HEADER_NAME, 
Config.Agent.AUTHENTICATION);
 
                         super.start(responseListener, headers);
                     }

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to