diff --git a/src/Authentication/JWT/JwtMiddleware.cs b/src/Authentication/JWT/JwtMiddleware.cs index d35b7f8..24989d3 100644 --- a/src/Authentication/JWT/JwtMiddleware.cs +++ b/src/Authentication/JWT/JwtMiddleware.cs @@ -86,7 +86,7 @@ public class User public class TokenModel { - [JsonProperty("accessToken")] + [JsonProperty("access_token")] public string AccessToken { get; set; } [JsonProperty("expires_in")] diff --git a/tests/Authentication/Tests.Jwt.Web/AuthenticationTests.cs b/tests/Authentication/Tests.Jwt.Web/AuthenticationTests.cs index 4741c53..24ce4ba 100644 --- a/tests/Authentication/Tests.Jwt.Web/AuthenticationTests.cs +++ b/tests/Authentication/Tests.Jwt.Web/AuthenticationTests.cs @@ -45,7 +45,7 @@ public async Task Get_returns_200_if_authenticated(TestWebApplicationFactory fac var obj = JObject.Parse(body); - token = obj["accessToken"].Value(); + token = obj["access_token"].Value(); } }