Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
4de94d41
Commit
4de94d41
authored
9 years ago
by
murgatroid99
Browse files
Options
Downloads
Patches
Plain Diff
Added more documentation to credentials.js
parent
47f519ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/node/src/credentials.js
+24
-1
24 additions, 1 deletion
src/node/src/credentials.js
with
24 additions
and
1 deletion
src/node/src/credentials.js
+
24
−
1
View file @
4de94d41
...
@@ -33,6 +33,29 @@
...
@@ -33,6 +33,29 @@
/**
/**
* Credentials module
* Credentials module
*
* This module contains factory methods for two different credential types:
* CallCredentials and ChannelCredentials. ChannelCredentials are things like
* SSL credentials that can be used to secure a connection, and are used to
* construct a Client object. CallCredentials genrally modify metadata, so they
* can be attached to an individual method call.
*
* CallCredentials can be composed with other CallCredentials to create
* CallCredentials. ChannelCredentials can be composed with CallCredentials
* to create ChannelCredentials. No combined credential can have more than
* one ChannelCredentials.
*
* For example, to create a client secured with SSL that uses Google
* default application credentials to authenticate:
*
* var channel_creds = credentials.createSsl(root_certs);
* (new GoogleAuth()).getApplicationDefault(function(err, credential) {
* var call_creds = credentials.createFromGoogleCredential(credential);
* var combined_creds = credentials.combineChannelCredentials(
* channel_creds, call_creds);
* var client = new Client(address, combined_creds);
* });
*
* @module
* @module
*/
*/
...
@@ -134,7 +157,7 @@ exports.combineCallCredentials = function() {
...
@@ -134,7 +157,7 @@ exports.combineCallCredentials = function() {
/**
/**
* Create an insecure credentials object. This is used to create a channel that
* Create an insecure credentials object. This is used to create a channel that
* does not use SSL.
* does not use SSL.
This cannot be composed with anything.
* @return {ChannelCredentials} The insecure credentials object
* @return {ChannelCredentials} The insecure credentials object
*/
*/
exports
.
createInsecure
=
ChannelCredentials
.
createInsecure
;
exports
.
createInsecure
=
ChannelCredentials
.
createInsecure
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment