@@ -76,8 +76,8 @@ var ERROR_RESPONSES = {
7676/**
7777 * Support base64 in node like how it works in the browser.
7878 *
79- * @param {String } string
80- * @return {String }
79+ * @param {string } string
80+ * @return {string }
8181 */
8282function btoaBuffer ( string ) {
8383 return new Buffer ( string ) . toString ( 'base64' )
@@ -105,7 +105,7 @@ function expects (obj, props) {
105105 * Pull an authentication error from the response data.
106106 *
107107 * @param {Object } data
108- * @return {String }
108+ * @return {string }
109109 */
110110function getAuthError ( body ) {
111111 var message = ERROR_RESPONSES [ body . error ] ||
@@ -123,7 +123,7 @@ function getAuthError (body) {
123123/**
124124 * Attempt to parse response body as JSON, fall back to parsing as a query string.
125125 *
126- * @param {String } body
126+ * @param {string } body
127127 * @return {Object }
128128 */
129129function parseResponseBody ( body ) {
@@ -138,7 +138,7 @@ function parseResponseBody (body) {
138138 * Sanitize the scopes option to be a string.
139139 *
140140 * @param {Array } scopes
141- * @return {String }
141+ * @return {string }
142142 */
143143function sanitizeScope ( scopes ) {
144144 return Array . isArray ( scopes ) ? scopes . join ( ' ' ) : toString ( scopes )
@@ -148,8 +148,8 @@ function sanitizeScope (scopes) {
148148 * Create a request uri based on an options object and token type.
149149 *
150150 * @param {Object } options
151- * @param {String } tokenType
152- * @return {String }
151+ * @param {string } tokenType
152+ * @return {string }
153153 */
154154function createUri ( options , tokenType ) {
155155 // Check the required parameters are set.
@@ -174,9 +174,9 @@ function createUri (options, tokenType) {
174174/**
175175 * Create basic auth header.
176176 *
177- * @param {String } username
178- * @param {String } password
179- * @return {String }
177+ * @param {string } username
178+ * @param {string } password
179+ * @return {string }
180180 */
181181function auth ( username , password ) {
182182 return 'Basic ' + btoa ( toString ( username ) + ':' + toString ( password ) )
@@ -185,8 +185,8 @@ function auth (username, password) {
185185/**
186186 * Ensure a value is a string.
187187 *
188- * @param {String } str
189- * @return {String }
188+ * @param {string } str
189+ * @return {string }
190190 */
191191function toString ( str ) {
192192 return str == null ? '' : String ( str )
@@ -229,9 +229,9 @@ ClientOAuth2.Token = ClientOAuth2Token
229229/**
230230 * Create a new token from existing data.
231231 *
232- * @param {String } access
233- * @param {String } [refresh]
234- * @param {String } [type]
232+ * @param {string } access
233+ * @param {string } [refresh]
234+ * @param {string } [type]
235235 * @param {Object } [data]
236236 * @return {Object }
237237 */
@@ -302,7 +302,7 @@ function ClientOAuth2Token (client, data) {
302302/**
303303 * Expire the token after some time.
304304 *
305- * @param {Number |Date } duration Seconds from now to expire, or a date to expire on.
305+ * @param {number |Date } duration Seconds from now to expire, or a date to expire on.
306306 * @return {Date }
307307 */
308308ClientOAuth2Token . prototype . expiresIn = function ( duration ) {
@@ -384,7 +384,7 @@ ClientOAuth2Token.prototype.refresh = function (options) {
384384/**
385385 * Check whether the token has expired.
386386 *
387- * @return {Boolean }
387+ * @return {boolean }
388388 */
389389ClientOAuth2Token . prototype . expired = function ( ) {
390390 return Date . now ( ) > this . expires . getTime ( )
@@ -404,8 +404,8 @@ function OwnerFlow (client) {
404404/**
405405 * Make a request on behalf of the user credentials to get an acces token.
406406 *
407- * @param {String } username
408- * @param {String } password
407+ * @param {string } username
408+ * @param {string } password
409409 * @return {Promise }
410410 */
411411OwnerFlow . prototype . getToken = function ( username , password , options ) {
@@ -446,7 +446,7 @@ function TokenFlow (client) {
446446 * Get the uri to redirect the user to for implicit authentication.
447447 *
448448 * @param {Object } options
449- * @return {String }
449+ * @return {string }
450450 */
451451TokenFlow . prototype . getUri = function ( options ) {
452452 options = extend ( this . client . options , options )
@@ -457,7 +457,7 @@ TokenFlow.prototype.getUri = function (options) {
457457/**
458458 * Get the user access token from the uri.
459459 *
460- * @param {String } uri
460+ * @param {string } uri
461461 * @param {Object } [options]
462462 * @return {Promise }
463463 */
@@ -559,7 +559,7 @@ function CodeFlow (client) {
559559/**
560560 * Generate the uri for doing the first redirect.
561561 *
562- * @return {String }
562+ * @return {string }
563563 */
564564CodeFlow . prototype . getUri = function ( options ) {
565565 options = extend ( this . client . options , options )
@@ -571,7 +571,7 @@ CodeFlow.prototype.getUri = function (options) {
571571 * Get the code token from the redirected uri and make another request for
572572 * the user access token.
573573 *
574- * @param {String } uri
574+ * @param {string } uri
575575 * @param {Object } [options]
576576 * @return {Promise }
577577 */
@@ -645,8 +645,8 @@ function JwtBearerFlow (client) {
645645/**
646646 * Request an access token using a JWT token.
647647 *
648- * @param {string } token A JWT token.
649- * @param {Object } [options]
648+ * @param {string } token A JWT token.
649+ * @param {Object } [options]
650650 * @return {Promise }
651651 */
652652JwtBearerFlow . prototype . getToken = function ( token , options ) {
0 commit comments