Skip to content

Commit be3e7b3

Browse files
authored
Merge pull request #356 from clhodapp/master
Fix OAuth2 Grant Types
2 parents f0a1b3f + 89615a2 commit be3e7b3

File tree

7 files changed

+8
-8103
lines changed

7 files changed

+8
-8103
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = function (grunt) {
4747
connect: {
4848
options: {
4949
hostname: '0.0.0.0',
50-
port: 9000
50+
port: grunt.option('port') || 9000
5151
},
5252

5353
livereload: {

dist/scripts/api-console.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,7 +3086,7 @@
30863086
};
30873087

30883088
$scope.ownerOptionsEnabled = function () {
3089-
return $scope.credentials.grant === 'owner';
3089+
return $scope.credentials.grant === 'password';
30903090
};
30913091

30923092
$scope.isImplicitEnabled = function () {
@@ -3110,18 +3110,10 @@
31103110
label: 'Authorization Code',
31113111
value: 'authorization_code'
31123112
},
3113-
{
3114-
label: 'Resource Owner Password Credentials',
3115-
value: 'owner'
3116-
},
31173113
{
31183114
label: 'Resource Owner Password Credentials',
31193115
value: 'password'
31203116
},
3121-
{
3122-
label: 'Client Credentials',
3123-
value: 'credentials'
3124-
},
31253117
{
31263118
label: 'Client Credentials',
31273119
value: 'client_credentials'
@@ -3684,7 +3676,7 @@
36843676
popup(auth[grantType].getUri());
36853677
}
36863678

3687-
if (grantType === 'owner' || grantType === 'password') {
3679+
if (grantType === 'password') {
36883680
auth.owner.getToken(this.credentials.username, this.credentials.password, function (err, user, raw) {
36893681
if (err) {
36903682
done(raw, err);
@@ -3698,7 +3690,7 @@
36983690
});
36993691
}
37003692

3701-
if (grantType === 'credentials'|| grantType === 'client_credentials') {
3693+
if (grantType === 'client_credentials') {
37023694
auth.credentials.getToken(function (err, user, raw) {
37033695
if (err) {
37043696
done(raw, err);

0 commit comments

Comments
 (0)