Skip to content
Prev Previous commit
Next Next commit
Update unit tests with new JSON payload
  • Loading branch information
asiffermann committed May 21, 2019
commit be7becb955058e7f03d2d46569155955d884c80a
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ protected internal override void RegisterAuthentication(AuthenticationBuilder bu
[InlineData(ClaimTypes.Email, "[email protected]")]
[InlineData(ClaimTypes.GivenName, "Frodo")]
[InlineData(ClaimTypes.Surname, "Baggins")]
[InlineData("urn:linkedin:headline", "Jewelery Repossession in Middle Earth")]
public async Task Can_Sign_In_Using_LinkedIn(string claimType, string claimValue)
{
// Arrange
Expand Down
46 changes: 37 additions & 9 deletions test/AspNet.Security.OAuth.Providers.Tests/LinkedIn/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,48 @@
}
},
{
"comment": "https://developer.linkedin.com/docs/signin-with-linkedin",
"uri": "https://api.linkedin.com/v1/people/~:(id,first-name,last-name,formatted-name,email-address)",
"comment": "https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin",
"uri": "https://api.linkedin.com/v2/me?projection=(id,firstName,lastName)",
"contentFormat": "json",
"contentJson": {
"firstName": "Frodo",
"headline": "Jewelery Repossession in Middle Earth",
"id": "1R2RtA",
"lastName": "Baggins",
"formattedName": "Frodo Baggins",
"emailAddress": "[email protected]",
"siteStandardProfileRequest": {
"url": "https://www.linkedin.com/profile/view?id=frodo-baggins"
"firstName": {
"localized": {
"en_US": "Frodo"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"lastName": {
"localized": {
"en_US": "Baggins"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"profilePicture": {
"displayImage": "urn:li:digitalmediaAsset:B54328XZFfe2134zTyq"
}
}
},
{
"comment": "https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin",
"uri": "https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))",
"contentFormat": "json",
"contentJson": {
"elements": [
{
"handle": "urn:li:emailAddress:3775708763",
"handle~": {
"emailAddress": "[email protected]"
}
}
]
}
}
]
}