File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
java/com/engflow/notificationqueue Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,14 @@ public static void main(String[] args) throws Exception {
84
84
}
85
85
try {
86
86
final Metadata header = new Metadata ();
87
- Metadata .Key <String > methodKey =
88
- Metadata .Key .of ("x-engflow-auth-method" , Metadata .ASCII_STRING_MARSHALLER );
89
- header .put (methodKey , "jwt-v0" );
90
- Metadata .Key <String > tokenKey =
91
- Metadata .Key .of ("x-engflow-auth-token" , Metadata .ASCII_STRING_MARSHALLER );
92
- header .put (tokenKey , clientOptions .getOption ("token" ));
87
+ if (!Strings .isNullOrEmpty (clientOptions .getOption ("token" ))) {
88
+ Metadata .Key <String > methodKey =
89
+ Metadata .Key .of ("x-engflow-auth-method" , Metadata .ASCII_STRING_MARSHALLER );
90
+ header .put (methodKey , "jwt-v0" );
91
+ Metadata .Key <String > tokenKey =
92
+ Metadata .Key .of ("x-engflow-auth-token" , Metadata .ASCII_STRING_MARSHALLER );
93
+ header .put (tokenKey , clientOptions .getOption ("token" ));
94
+ }
93
95
pull (channel , clientOptions .getOption ("queue_name" ), header , forwardChannel );
94
96
} finally {
95
97
if (channel != null ) {
You can’t perform that action at this time.
0 commit comments