1# Copyright 2019 The gRPC Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15filegroup( 16 name = "_credentials_files", 17 testonly = 1, 18 srcs = [ 19 "credentials/localhost.crt", 20 "credentials/localhost.key", 21 "credentials/root.crt", 22 ], 23) 24 25py_library( 26 name = "_credentials", 27 testonly = 1, 28 srcs = ["_credentials.py"], 29 data = [":_credentials_files"], 30) 31 32py_binary( 33 name = "customized_auth_client", 34 testonly = 1, 35 srcs = ["customized_auth_client.py"], 36 python_version = "PY3", 37 deps = [ 38 ":_credentials", 39 "//examples:helloworld_py_pb2", 40 "//examples:helloworld_py_pb2_grpc", 41 "//src/python/grpcio/grpc:grpcio", 42 ], 43) 44 45py_binary( 46 name = "customized_auth_server", 47 testonly = 1, 48 srcs = ["customized_auth_server.py"], 49 python_version = "PY3", 50 deps = [ 51 ":_credentials", 52 "//examples:helloworld_py_pb2", 53 "//examples:helloworld_py_pb2_grpc", 54 "//src/python/grpcio/grpc:grpcio", 55 ], 56) 57 58py_test( 59 name = "_auth_example_test", 60 srcs = ["test/_auth_example_test.py"], 61 python_version = "PY3", 62 deps = [ 63 ":_credentials", 64 ":customized_auth_client", 65 ":customized_auth_server", 66 "//examples:helloworld_py_pb2", 67 "//src/python/grpcio/grpc:grpcio", 68 ], 69) 70