Skip to content

Commit

Permalink
Fix for JwtMiddleware serialization (#3)
Browse files Browse the repository at this point in the history
* Updated the JwtMiddleware JsonProperty for access token in the Token model to be consistent and match the client package
* Fix for test
  • Loading branch information
elindanielsson authored and Kralizek committed May 27, 2019
1 parent b7e17fa commit 0fad812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Authentication/JWT/JwtMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class User

public class TokenModel
{
[JsonProperty("accessToken")]
[JsonProperty("access_token")]
public string AccessToken { get; set; }

[JsonProperty("expires_in")]
Expand Down
2 changes: 1 addition & 1 deletion tests/Authentication/Tests.Jwt.Web/AuthenticationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public async Task Get_returns_200_if_authenticated(TestWebApplicationFactory fac

var obj = JObject.Parse(body);

token = obj["accessToken"].Value<string>();
token = obj["access_token"].Value<string>();
}
}

Expand Down

0 comments on commit 0fad812

Please sign in to comment.