Skip to content

Commit 07a9fe7

Browse files
author
Pavel Strashkin
committed
Fix another oauth2 uri -> url typo
1 parent ce90a37 commit 07a9fe7

File tree

3 files changed

+45
-45
lines changed

3 files changed

+45
-45
lines changed

dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link href="styles/api-console-light-theme.css" rel="stylesheet" class="theme">
88
</head>
99
<body ng-app="ramlConsoleApp" ng-cloak class="raml-console-body">
10-
<raml-console single-view src="https://qa.anypoint.mulesoft.com/apiplatform/repository/public/organizations/121/apis/2951/versions/3337/files/root"></raml-console>
10+
<raml-initializer></raml-initializer>
1111
<script src="scripts/api-console-vendor.js"></script>
1212
<script src="scripts/api-console.js"></script>
1313
<script>

dist/scripts/api-console.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3769,7 +3769,7 @@ RAML.Inspector = (function() {
37693769
var authorization = btoa(options.clientId + ':' + options.clientSecret);
37703770

37713771
return this.client._request({
3772-
uri: options.accessTokenUri,
3772+
url: options.accessTokenUri,
37733773
method: 'POST',
37743774
headers: {
37753775
'Accept': 'application/json, application/x-www-form-urlencoded',
@@ -3831,7 +3831,7 @@ RAML.Inspector = (function() {
38313831
var authorization = btoa(options.clientId + ':' + options.clientSecret);
38323832

38333833
return this.client._request({
3834-
uri: options.accessTokenUri,
3834+
url: options.accessTokenUri,
38353835
method: 'POST',
38363836
headers: {
38373837
'Accept': 'application/json, application/x-www-form-urlencoded',
@@ -3891,13 +3891,13 @@ RAML.Inspector = (function() {
38913891
};
38923892

38933893
/**
3894-
* Get the user access token from the uri.
3894+
* Get the user access token from the url.
38953895
*
3896-
* @param {String} uri
3896+
* @param {String} url
38973897
* @param {String} [state]
38983898
* @param {Function} done
38993899
*/
3900-
TokenFlow.prototype.getToken = function (uri, state, done) {
3900+
TokenFlow.prototype.getToken = function (url, state, done) {
39013901
var options = this.client.options;
39023902
var err;
39033903

@@ -3907,17 +3907,17 @@ RAML.Inspector = (function() {
39073907
state = null;
39083908
}
39093909

3910-
// Make sure the uri matches our expected redirect uri.
3911-
if (uri.substr(0, options.redirectUri.length) !== options.redirectUri) {
3912-
return done(new Error('Invalid uri (should to match redirect): ' + uri));
3910+
// Make sure the url matches our expected redirect url.
3911+
if (url.substr(0, options.redirectUri.length) !== options.redirectUri) {
3912+
return done(new Error('Invalid url (should to match redirect): ' + url));
39133913
}
39143914

3915-
var queryString = uri.replace(/^[^\?]*|\#.*$/g, '').substr(1);
3916-
var fragmentString = uri.replace(/^[^\#]*/, '').substr(1);
3915+
var queryString = url.replace(/^[^\?]*|\#.*$/g, '').substr(1);
3916+
var fragmentString = url.replace(/^[^\#]*/, '').substr(1);
39173917

3918-
// Check whether a query string is present in the uri.
3918+
// Check whether a query string is present in the url.
39193919
if (!queryString && !fragmentString) {
3920-
return done(new Error('Unable to process uri: ' + uri));
3920+
return done(new Error('Unable to process url: ' + url));
39213921
}
39223922

39233923
// Merge the fragment with the the query string. This is because, at least,
@@ -3981,7 +3981,7 @@ RAML.Inspector = (function() {
39813981
var authorization = btoa(options.clientId + ':' + options.clientSecret);
39823982

39833983
return this.client._request({
3984-
uri: options.accessTokenUri,
3984+
url: options.accessTokenUri,
39853985
method: 'POST',
39863986
headers: {
39873987
'Accept': 'application/json, application/x-www-form-urlencoded',
@@ -4041,11 +4041,11 @@ RAML.Inspector = (function() {
40414041
* Get the code token from the redirected uri and make another request for
40424042
* the user access token.
40434043
*
4044-
* @param {String} uri
4044+
* @param {String} url
40454045
* @param {String} [state]
40464046
* @param {Function} done
40474047
*/
4048-
CodeFlow.prototype.getToken = function (uri, state, done) {
4048+
CodeFlow.prototype.getToken = function (url, state, done) {
40494049
var self = this;
40504050
var options = this.client.options;
40514051
var err;
@@ -4063,17 +4063,17 @@ RAML.Inspector = (function() {
40634063
'accessTokenUri'
40644064
]);
40654065

4066-
// Make sure the uri matches our expected redirect uri.
4067-
if (uri.substr(0, options.redirectUri.length) !== options.redirectUri) {
4068-
return done(new Error('Invalid uri (should to match redirect): ' + uri));
4066+
// Make sure the url matches our expected redirect url.
4067+
if (url.substr(0, options.redirectUri.length) !== options.redirectUri) {
4068+
return done(new Error('Invalid url (should to match redirect): ' + url));
40694069
}
40704070

40714071
// Extract the query string from the url.
4072-
var queryString = uri.replace(/^[^\?]*|\#.*$/g, '').substr(1);
4072+
var queryString = url.replace(/^[^\?]*|\#.*$/g, '').substr(1);
40734073

4074-
// Check whether a query string is present in the uri.
4074+
// Check whether a query string is present in the url.
40754075
if (!queryString) {
4076-
return done(new Error('Unable to process uri: ' + uri));
4076+
return done(new Error('Unable to process url: ' + url));
40774077
}
40784078

40794079
var query = uriDecode(queryString);
@@ -4094,7 +4094,7 @@ RAML.Inspector = (function() {
40944094
}
40954095

40964096
return this.client._request({
4097-
uri: options.accessTokenUri,
4097+
url: options.accessTokenUri,
40984098
method: 'POST',
40994099
headers: {
41004100
'Accept': 'application/json, application/x-www-form-urlencoded',

src/vendor/client-oauth2/client-oauth2.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@
529529
var authorization = btoa(options.clientId + ':' + options.clientSecret);
530530

531531
return this.client._request({
532-
uri: options.accessTokenUri,
532+
url: options.accessTokenUri,
533533
method: 'POST',
534534
headers: {
535535
'Accept': 'application/json, application/x-www-form-urlencoded',
@@ -591,7 +591,7 @@
591591
var authorization = btoa(options.clientId + ':' + options.clientSecret);
592592

593593
return this.client._request({
594-
uri: options.accessTokenUri,
594+
url: options.accessTokenUri,
595595
method: 'POST',
596596
headers: {
597597
'Accept': 'application/json, application/x-www-form-urlencoded',
@@ -651,13 +651,13 @@
651651
};
652652

653653
/**
654-
* Get the user access token from the uri.
654+
* Get the user access token from the url.
655655
*
656-
* @param {String} uri
656+
* @param {String} url
657657
* @param {String} [state]
658658
* @param {Function} done
659659
*/
660-
TokenFlow.prototype.getToken = function (uri, state, done) {
660+
TokenFlow.prototype.getToken = function (url, state, done) {
661661
var options = this.client.options;
662662
var err;
663663

@@ -667,17 +667,17 @@
667667
state = null;
668668
}
669669

670-
// Make sure the uri matches our expected redirect uri.
671-
if (uri.substr(0, options.redirectUri.length) !== options.redirectUri) {
672-
return done(new Error('Invalid uri (should to match redirect): ' + uri));
670+
// Make sure the url matches our expected redirect url.
671+
if (url.substr(0, options.redirectUri.length) !== options.redirectUri) {
672+
return done(new Error('Invalid url (should to match redirect): ' + url));
673673
}
674674

675-
var queryString = uri.replace(/^[^\?]*|\#.*$/g, '').substr(1);
676-
var fragmentString = uri.replace(/^[^\#]*/, '').substr(1);
675+
var queryString = url.replace(/^[^\?]*|\#.*$/g, '').substr(1);
676+
var fragmentString = url.replace(/^[^\#]*/, '').substr(1);
677677

678-
// Check whether a query string is present in the uri.
678+
// Check whether a query string is present in the url.
679679
if (!queryString && !fragmentString) {
680-
return done(new Error('Unable to process uri: ' + uri));
680+
return done(new Error('Unable to process url: ' + url));
681681
}
682682

683683
// Merge the fragment with the the query string. This is because, at least,
@@ -741,7 +741,7 @@
741741
var authorization = btoa(options.clientId + ':' + options.clientSecret);
742742

743743
return this.client._request({
744-
uri: options.accessTokenUri,
744+
url: options.accessTokenUri,
745745
method: 'POST',
746746
headers: {
747747
'Accept': 'application/json, application/x-www-form-urlencoded',
@@ -801,11 +801,11 @@
801801
* Get the code token from the redirected uri and make another request for
802802
* the user access token.
803803
*
804-
* @param {String} uri
804+
* @param {String} url
805805
* @param {String} [state]
806806
* @param {Function} done
807807
*/
808-
CodeFlow.prototype.getToken = function (uri, state, done) {
808+
CodeFlow.prototype.getToken = function (url, state, done) {
809809
var self = this;
810810
var options = this.client.options;
811811
var err;
@@ -823,17 +823,17 @@
823823
'accessTokenUri'
824824
]);
825825

826-
// Make sure the uri matches our expected redirect uri.
827-
if (uri.substr(0, options.redirectUri.length) !== options.redirectUri) {
828-
return done(new Error('Invalid uri (should to match redirect): ' + uri));
826+
// Make sure the url matches our expected redirect url.
827+
if (url.substr(0, options.redirectUri.length) !== options.redirectUri) {
828+
return done(new Error('Invalid url (should to match redirect): ' + url));
829829
}
830830

831831
// Extract the query string from the url.
832-
var queryString = uri.replace(/^[^\?]*|\#.*$/g, '').substr(1);
832+
var queryString = url.replace(/^[^\?]*|\#.*$/g, '').substr(1);
833833

834-
// Check whether a query string is present in the uri.
834+
// Check whether a query string is present in the url.
835835
if (!queryString) {
836-
return done(new Error('Unable to process uri: ' + uri));
836+
return done(new Error('Unable to process url: ' + url));
837837
}
838838

839839
var query = uriDecode(queryString);
@@ -854,7 +854,7 @@
854854
}
855855

856856
return this.client._request({
857-
uri: options.accessTokenUri,
857+
url: options.accessTokenUri,
858858
method: 'POST',
859859
headers: {
860860
'Accept': 'application/json, application/x-www-form-urlencoded',

0 commit comments

Comments
 (0)