Add url scheme to ALTS security connector

pull/21333/head
jiangtaoli2016 5 years ago
parent a02d6b9be8
commit 735d228145
  1. 4
      src/core/lib/security/security_connector/alts/alts_security_connector.cc
  2. 1
      src/core/lib/security/security_connector/alts/alts_security_connector.h

@ -69,7 +69,7 @@ class grpc_alts_channel_security_connector final
grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
const char* target_name)
: grpc_channel_security_connector(/*url_scheme=*/nullptr,
: grpc_channel_security_connector(GRPC_ALTS_URL_SCHEME,
std::move(channel_creds),
std::move(request_metadata_creds)),
target_name_(gpr_strdup(target_name)) {}
@ -129,7 +129,7 @@ class grpc_alts_server_security_connector final
public:
grpc_alts_server_security_connector(
grpc_core::RefCountedPtr<grpc_server_credentials> server_creds)
: grpc_server_security_connector(/*url_scheme=*/nullptr,
: grpc_server_security_connector(GRPC_ALTS_URL_SCHEME,
std::move(server_creds)) {}
~grpc_alts_server_security_connector() override = default;

@ -25,6 +25,7 @@
#include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h"
#define GRPC_ALTS_TRANSPORT_SECURITY_TYPE "alts"
#define GRPC_ALTS_URL_SCHEME "https"
/**
* This method creates an ALTS channel security connector.

Loading…
Cancel
Save