File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -141,17 +141,21 @@ export class BaseService {
141141 }
142142
143143 /**
144- * Set an IAM access token to authenticate the service with
145- * The SDK will assume this token is valid and that this method
146- * will be used to set a new token upon expiration.
144+ * Set an IAM access token to use when authenticating with the service.
145+ * The access token should be valid and not yet expired.
147146 *
148- * @param {string } accessToken - Valid IAM access token
147+ * By using this method, you accept responsibility for managing the
148+ * access token yourself. You must set a new access token before this
149+ * one expires. Failing to do so will result in authentication errors
150+ * after this token expires.
151+ *
152+ * @param {string } access_token - A valid, non-expired IAM access token
149153 * @returns {void }
150154 */
151- public setAccessToken ( accessToken : string ) {
152- this . _options . access_token = accessToken ;
155+ public setAccessToken ( access_token : string ) { // tslint:disable-line variable-name
156+ this . _options . access_token = access_token ;
153157 this . _options . headers = this . _options . headers || { } ;
154- this . _options . headers . Authorization = `Bearer ${ accessToken } ` ;
158+ this . _options . headers . Authorization = `Bearer ${ access_token } ` ;
155159 }
156160
157161 /**
You can’t perform that action at this time.
0 commit comments