(self, context)
return list(six.iteritems(headers))
Gets the authorization headers for a request.

        Returns:
            Sequence[Tuple[str, str]]: A list of request headers (key, value)
                to add to the request.
Gets the authorization headers for a request.
Gets the authorization headers for a request .
def _get_authorization_headers(self, context):
        """Gets the authorization headers for a request.

        Returns:
            Sequence[Tuple[str, str]]: A list of request headers (key, value)
                to add to the request.
        """
        headers = {}

        # https://google.aip.dev/auth/4111
        # Attempt to use self-signed JWTs when a service account is used.
        # A default host must be explicitly provided since it cannot always
        # be determined from the context.service_url.
        if isinstance(self._credentials, service_account.Credentials):
            self._credentials._create_self_signed_jwt(
                "https://{}/".format(self._default_host) if self._default_host else None
            )

        self._credentials.before_request(
            self._request, context.method_name, context.service_url, headers
        )

        return list(six.iteritems(headers))
def _get_authorization_headers ( self , context ) : headers = { } # https://google.aip.dev/auth/4111 # Attempt to use self-signed JWTs when a service account is used. # A default host must be explicitly provided since it cannot always # be determined from the context.service_url. if isinstance ( self . _credentials , service_account . Credentials ) : self . _credentials . _create_self_signed_jwt ( "https://{}/" . format ( self . _default_host ) if self . _default_host else None ) self . _credentials . before_request ( self . _request , context . method_name , context . service_url , headers ) return list ( six . iteritems ( headers ) )