mirror of https://github.com/grpc/grpc-node.git
Removed now-extaneous function
This commit is contained in:
parent
566e277a25
commit
285e6e66d5
26
index.js
26
index.js
|
@ -94,32 +94,6 @@ exports.load = function load(filename, format) {
|
||||||
return loadObject(builder.ns);
|
return loadObject(builder.ns);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a function that a client can use to update metadata with authentication
|
|
||||||
* information from a Google Auth credential object, which comes from the
|
|
||||||
* google-auth-library.
|
|
||||||
* @param {Object} credential The credential object to use
|
|
||||||
* @return {function(Object, callback)} Metadata updater function
|
|
||||||
*/
|
|
||||||
exports.getGoogleAuthDelegate = function getGoogleAuthDelegate(credential) {
|
|
||||||
/**
|
|
||||||
* Update a metadata object with authentication information.
|
|
||||||
* @param {string} authURI The uri to authenticate to
|
|
||||||
* @param {Object} metadata Metadata object
|
|
||||||
* @param {function(Error, Object)} callback
|
|
||||||
*/
|
|
||||||
return function updateMetadata(authURI, metadata, callback) {
|
|
||||||
credential.getRequestMetadata(authURI, function(err, header) {
|
|
||||||
if (err) {
|
|
||||||
callback(err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
metadata.add('authorization', header.Authorization);
|
|
||||||
callback(null, metadata);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see module:src/server.Server
|
* @see module:src/server.Server
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue