|
|
|
@ -43,6 +43,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2084), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2084), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
@ -153,6 +154,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.GrantType), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -173,6 +175,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidClient, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.ClientId), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -193,6 +196,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.Code), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -212,6 +216,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.RefreshToken), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
@ -235,6 +240,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2057(Parameters.ClientId, Parameters.ClientSecret), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2057), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
@ -258,6 +264,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2059(Parameters.Username, Parameters.Password), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2059), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -285,6 +292,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.CodeVerifier), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -357,6 +365,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2001), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2001), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -376,6 +385,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2003), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2003), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -418,6 +428,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2016), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2016), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -459,6 +470,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2018), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2018), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -544,6 +556,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2069), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2069), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -586,6 +599,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2071), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2071), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -630,6 +644,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.RedirectUri), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -674,6 +689,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2072(Parameters.RedirectUri), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2072), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -717,6 +733,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2073(Parameters.CodeVerifier, Parameters.CodeChallenge), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2073), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -762,6 +779,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.CodeVerifier), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -901,6 +919,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2052(Parameters.CodeVerifier), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2052), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
@ -1001,6 +1020,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2074(Parameters.Scope), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2074), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1046,6 +1066,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2052(Parameters.Scope), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2052), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1089,6 +1110,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2074(Parameters.Scope), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2074), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1132,6 +1154,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2052(Parameters.Scope), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2052), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Theory] |
|
|
|
@ -1165,6 +1188,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.UnsupportedGrantType, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2032(Parameters.GrantType), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2032), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1192,6 +1216,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2035(Scopes.OfflineAccess), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2035), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1223,6 +1248,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidScope, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2052(Parameters.Scope), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2052), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1336,6 +1362,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2057(Parameters.ClientId, Parameters.ClientSecret), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2057), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1362,6 +1389,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidClient, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2029(Parameters.ClientId), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2029), response.ErrorUri); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
@ -1393,6 +1421,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidClient, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2052(Parameters.ClientId), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2052), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
} |
|
|
|
@ -1430,6 +1459,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.UnauthorizedClient, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2043(Parameters.GrantType), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2043), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -1470,6 +1500,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidClient, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2053(Parameters.ClientSecret), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2053), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -1510,6 +1541,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidClient, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2054(Parameters.ClientSecret), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2054), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -1553,6 +1585,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidClient, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2055), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2055), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasClientTypeAsync(application, ClientTypes.Public, It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
@ -1599,6 +1632,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.UnauthorizedClient, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2063), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2063), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, |
|
|
|
@ -1645,6 +1679,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.UnauthorizedClient, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2064), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2064), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByClientIdAsync("Fabrikam", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, |
|
|
|
@ -1696,6 +1731,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2065(Scopes.OfflineAccess), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2065), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, |
|
|
|
Permissions.GrantTypes.RefreshToken, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -1747,6 +1783,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2051), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2051), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.HasPermissionAsync(application, |
|
|
|
Permissions.Prefixes.Scope + Scopes.OpenId, It.IsAny<CancellationToken>()), Times.Never()); |
|
|
|
@ -1797,6 +1834,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidRequest, response.Error); |
|
|
|
Assert.Equal(SR.FormatID2054(Parameters.CodeVerifier), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2054), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.HasRequirementAsync(application, |
|
|
|
Requirements.Features.ProofKeyForCodeExchange, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -2226,6 +2264,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2001), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2001), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
} |
|
|
|
@ -2285,6 +2324,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2003), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2003), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
} |
|
|
|
@ -2365,6 +2405,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2010), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2010), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Redeemed, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -2438,6 +2479,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2012), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2012), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Redeemed, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -2511,6 +2553,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2012), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2012), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Redeemed, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -2684,6 +2727,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2010), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2010), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(tokens[0], Statuses.Redeemed, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -2776,6 +2820,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2012), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2012), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(tokens[0], Statuses.Redeemed, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -2868,6 +2913,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2012), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2012), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(tokens[0], Statuses.Redeemed, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -3060,6 +3106,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2016), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2016), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("3E228451-1555-46F7-A471-951EFBA23A56", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Redeemed, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -3133,6 +3180,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2018), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2018), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("60FFF7EA-F98E-437B-937E-5073CC313103", It.IsAny<CancellationToken>()), Times.AtLeastOnce()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(token, Statuses.Valid, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -3414,6 +3462,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2020), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2020), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
} |
|
|
|
@ -3512,6 +3561,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2020), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2020), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(authorization, Statuses.Valid, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
@ -3592,6 +3642,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2022), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2022), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
} |
|
|
|
@ -3676,6 +3727,7 @@ namespace OpenIddict.Server.IntegrationTests |
|
|
|
// Assert
|
|
|
|
Assert.Equal(Errors.InvalidGrant, response.Error); |
|
|
|
Assert.Equal(SR.GetResourceString(SR.ID2022), response.ErrorDescription); |
|
|
|
Assert.Equal(SR.FormatID8000(SR.ID2022), response.ErrorUri); |
|
|
|
|
|
|
|
Mock.Get(manager).Verify(manager => manager.FindByIdAsync("18D15F73-BE2B-6867-DC01-B3C1E8AFDED0", It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
Mock.Get(manager).Verify(manager => manager.HasStatusAsync(authorization, Statuses.Valid, It.IsAny<CancellationToken>()), Times.Once()); |
|
|
|
|