-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
normalize the responses to camelCase and add missing attrs on parseHa…
…sh response
- Loading branch information
Showing
12 changed files
with
144 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ describe('auth0.Management', function () { | |
this.auth0.getUser('auth0|123', function(err, user) { | ||
expect(err).to.be(null); | ||
expect(user).to.eql({ | ||
'user_id': 'auth0|123', | ||
'userId': 'auth0|123', | ||
'email': '[email protected]' | ||
}); | ||
done(); | ||
|
@@ -182,9 +182,9 @@ describe('auth0.Management', function () { | |
this.auth0.patchUserMetadata('auth0|123', {role:'admin'}, function(err, user) { | ||
expect(err).to.be(null); | ||
expect(user).to.eql({ | ||
'user_id': 'auth0|123', | ||
'userId': 'auth0|123', | ||
'email': '[email protected]', | ||
'user_metadata': { role: 'admin' } | ||
'userMetadata': { role: 'admin' } | ||
}); | ||
done(); | ||
}) | ||
|
@@ -281,20 +281,20 @@ describe('auth0.Management', function () { | |
expect(err).to.be(null); | ||
expect(user).to.eql([{ | ||
'connection': 'twitter', | ||
'user_id': '191919191919191', | ||
'userId': '191919191919191', | ||
'provider': 'twitter', | ||
'profileData': { | ||
'email': '', | ||
'email_verified': false, | ||
'emailVerified': false, | ||
'name': '', | ||
'username': 'johndoe', | ||
'given_name': '', | ||
'givenName': '', | ||
'phoneNumber': '', | ||
'phone_verified': false, | ||
'family_name': '' | ||
'phoneVerified': false, | ||
'familyName': '' | ||
}, | ||
'isSocial': false, | ||
'access_token': '' | ||
'accessToken': '' | ||
}]); | ||
done(); | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,6 @@ describe('auth0.WebAuth.popup', function () { | |
expect(relayUrl).to.be('https://me.auth0.com/relay.html'); | ||
expect(options).to.eql({}); | ||
cb(null, { | ||
_id: '...', | ||
email_verified: false, | ||
email: '[email protected]' | ||
}); | ||
|
@@ -102,8 +101,7 @@ describe('auth0.WebAuth.popup', function () { | |
}, function (err, data) { | ||
expect(err).to.be(null); | ||
expect(data).to.eql({ | ||
_id: '...', | ||
email_verified: false, | ||
emailVerified: false, | ||
email: '[email protected]' | ||
}); | ||
done(); | ||
|
@@ -143,8 +141,7 @@ describe('auth0.WebAuth.popup', function () { | |
}); | ||
|
||
cb(null, { | ||
_id: '...', | ||
email_verified: false, | ||
emailVerified: false, | ||
email: '[email protected]' | ||
}); | ||
}); | ||
|
@@ -159,8 +156,7 @@ describe('auth0.WebAuth.popup', function () { | |
}, function (err, data) { | ||
expect(err).to.be(null); | ||
expect(data).to.eql({ | ||
_id: '...', | ||
email_verified: false, | ||
emailVerified: false, | ||
email: '[email protected]' | ||
}); | ||
done(); | ||
|
@@ -223,9 +219,9 @@ describe('auth0.WebAuth.popup', function () { | |
cb: function (cb) { | ||
cb(null, { | ||
body: { | ||
id_token: 'id_token.id_token.id_token', | ||
access_token: 'access_token', | ||
token_type: 'bearer' | ||
idToken: 'id_token.id_token.id_token', | ||
accessToken: 'access_token', | ||
tokenType: 'bearer' | ||
} | ||
}); | ||
} | ||
|
@@ -242,9 +238,9 @@ describe('auth0.WebAuth.popup', function () { | |
}, function (err, data) { | ||
expect(err).to.be(null); | ||
expect(data).to.eql({ | ||
id_token: 'id_token.id_token.id_token', | ||
access_token: 'access_token', | ||
token_type: 'bearer' | ||
idToken: 'id_token.id_token.id_token', | ||
accessToken: 'access_token', | ||
tokenType: 'bearer' | ||
}); | ||
done(); | ||
}); | ||
|
@@ -309,9 +305,9 @@ describe('auth0.WebAuth.popup', function () { | |
}, function (err, data) { | ||
expect(err).to.be(null); | ||
expect(data).to.eql({ | ||
id_token: 'id_token.id_token.id_token', | ||
access_token: 'access_token', | ||
token_type: 'bearer' | ||
idToken: 'id_token.id_token.id_token', | ||
accessToken: 'access_token', | ||
tokenType: 'bearer' | ||
}); | ||
done(); | ||
}); | ||
|
@@ -492,7 +488,7 @@ describe('auth0.WebAuth.popup', function () { | |
}, | ||
"code":"user_exists", | ||
"description":"The user already exists.", | ||
"status_code":400 | ||
"statusCode":400 | ||
}); | ||
done(); | ||
}); | ||
|
Oops, something went wrong.