Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Commit2568c9e

Browse files
committed
Rename variable so it makes more sense
1 parent95828d6 commit2568c9e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/client-oauth2.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var Buffer = require('safe-buffer').Buffer
22
varQuerystring=require('querystring')
33
vardefaultRequest=require('./request')
44

5-
constURL_BASE='https://example.org/'
5+
constDEFAULT_URL_BASE='https://example.org/'
66

77
varbtoa
88
if(typeofBuffer==='function'){
@@ -465,8 +465,8 @@ TokenFlow.prototype.getUri = function (opts) {
465465
*/
466466
TokenFlow.prototype.getToken=function(uri,opts){
467467
varoptions=Object.assign({},this.client.options,opts)
468-
varurl=typeofuri==='object' ?uri :newURL(uri,URL_BASE)
469-
varexpectedUrl=newURL(options.redirectUri,URL_BASE)
468+
varurl=typeofuri==='object' ?uri :newURL(uri,DEFAULT_URL_BASE)
469+
varexpectedUrl=newURL(options.redirectUri,DEFAULT_URL_BASE)
470470

471471
if(typeofurl.pathname==='string'&&url.pathname!==expectedUrl.pathname){
472472
returnPromise.reject(
@@ -581,12 +581,12 @@ CodeFlow.prototype.getToken = function (uri, opts) {
581581

582582
expects(options,'clientId','accessTokenUri')
583583

584-
varurl=typeofuri==='object' ?uri :newURL(uri,URL_BASE)
584+
varurl=typeofuri==='object' ?uri :newURL(uri,DEFAULT_URL_BASE)
585585

586586
if(
587587
typeofoptions.redirectUri==='string'&&
588588
typeofurl.pathname==='string'&&
589-
url.pathname!==(newURL(options.redirectUri,URL_BASE)).pathname
589+
url.pathname!==(newURL(options.redirectUri,DEFAULT_URL_BASE)).pathname
590590
){
591591
returnPromise.reject(
592592
newTypeError('Redirected path should match configured path, but got: '+url.pathname)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp