Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SolidCAD-Mostafa committed Jul 29, 2023
1 parent eb1b999 commit 1f8478f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override async Task<AuthenticationTicket> CreateTicketAsync(
return new AuthenticationTicket(context.Principal!, context.Properties, Scheme.Name);
}

protected override async Task<OAuthTokenResponse> ExchangeCodeAsync(OAuthCodeExchangeContext context)
protected override async Task<OAuthTokenResponse> ExchangeCodeAsync([NotNull] OAuthCodeExchangeContext context)
{
var tokenRequestParameters = new Dictionary<string, string>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ protected internal override void RegisterAuthentication(AuthenticationBuilder bu
[InlineData(ClaimTypes.GivenName, "John")]
[InlineData(ClaimTypes.Surname, "Smith")]
[InlineData("urn:autodesk:emailverified", "True")]
[InlineData("urn:autodesk:twofactorenabled", "False")]
public async Task Can_Sign_In_Using_Autodesk(string claimType, string claimValue)
{
// Arrange
Expand Down
15 changes: 7 additions & 8 deletions test/AspNet.Security.OAuth.Providers.Tests/Autodesk/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
}
},
{
"uri": "https://developer.api.autodesk.com/userprofile/v1/users/@me",
"uri": "https://api.userprofile.autodesk.com/userinfo",
"contentFormat": "json",
"contentJson": {
"userId": "my-id",
"userName": "John Smith",
"firstName": "John",
"lastName": "Smith",
"emailId": "[email protected]",
"emailVerified": true,
"2FaEnabled": false
"sub": "my-id",
"preferred_username": "John Smith",
"given_name": "John",
"family_name": "Smith",
"email": "[email protected]",
"email_verified": true
}
}
]
Expand Down

0 comments on commit 1f8478f

Please sign in to comment.