Skip to content

Port access token management fix from IdentityModel repo #157

Port access token management fix from IdentityModel repo

Port access token management fix from IdentityModel repo #157

GitHub Actions / Test Report - AccessTokenManagement.Tests failed Nov 12, 2024 in 1s

42 passed, 10 failed and 0 skipped

Tests failed

❌ access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx

52 tests were completed in 11s with 42 passed, 10 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Duende.AccessTokenManagement.Tests.AccessTokenHandlerTests 1✅ 32ms
Duende.AccessTokenManagement.Tests.BackChannelClientTests 3✅ 71ms
Duende.AccessTokenManagement.Tests.ClientTokenManagementApiTests 13✅ 2s
Duende.AccessTokenManagement.Tests.ClientTokenManagementTests 15✅ 388ms
Duende.AccessTokenManagement.Tests.StoreTokensInAuthenticationPropertiesTests 7✅ 41ms
Duende.AccessTokenManagement.Tests.UserTokenManagementTests 2✅ 8❌ 6s
Duende.AccessTokenManagement.Tests.UserTokenManagementWithDPoPTests 1✅ 2❌ 8s

✅ Duende.AccessTokenManagement.Tests.AccessTokenHandlerTests

✅ lower_case_token_type_should_be_converted_to_case_sensitive

✅ Duende.AccessTokenManagement.Tests.BackChannelClientTests

✅ Get_access_token_uses_custom_backchannel_client_from_factory
✅ Get_access_token_uses_default_backchannel_client_from_factory
✅ Get_access_token_uses_specific_http_client_instance

✅ Duende.AccessTokenManagement.Tests.ClientTokenManagementApiTests

✅ api_returning_401_should_send_new_access_token
✅ dpop_clients_GetAccessTokenAsync_should_obtain_token_with_cnf
✅ dpop_tokens_should_be_passed_to_api
✅ using_different_ec_keys_for_dpop_should_obtain_token_with_cnf(alg: "ES256")
✅ using_different_ec_keys_for_dpop_should_obtain_token_with_cnf(alg: "ES384")
✅ using_different_ec_keys_for_dpop_should_obtain_token_with_cnf(alg: "ES512")
✅ using_different_rsa_keys_for_dpop_should_obtain_token_with_cnf(alg: "PS256")
✅ using_different_rsa_keys_for_dpop_should_obtain_token_with_cnf(alg: "PS384")
✅ using_different_rsa_keys_for_dpop_should_obtain_token_with_cnf(alg: "PS512")
✅ using_different_rsa_keys_for_dpop_should_obtain_token_with_cnf(alg: "RS256")
✅ using_different_rsa_keys_for_dpop_should_obtain_token_with_cnf(alg: "RS384")
✅ using_different_rsa_keys_for_dpop_should_obtain_token_with_cnf(alg: "RS512")
✅ when_api_issues_nonce_api_request_should_be_retried_with_new_nonce

✅ Duende.AccessTokenManagement.Tests.ClientTokenManagementTests

✅ client_should_use_nonce_when_sending_dpop_proof
✅ client_with_dpop_key_should_send_proof_token
✅ Missing_client_id_throw_exception
✅ Missing_expires_in_response_should_create_long_lived_token
✅ Missing_tokenEndpoint_throw_exception
✅ Request_assertion_should_take_precedence_over_service_assertion
✅ Request_assertions_should_be_sent_correctly
✅ Request_parameters_should_take_precedence_over_configuration
✅ Service_assertions_should_be_sent_correctly
✅ Service_should_always_hit_network_with_force_renewal
✅ Service_should_hit_network_only_once_and_then_use_cache
✅ Service_should_hit_network_when_cache_throws_exception
✅ Token_request_and_response_should_have_expected_values(style: AuthorizationHeader)
✅ Token_request_and_response_should_have_expected_values(style: PostBody)
✅ Unknown_client_should_throw_exception

✅ Duende.AccessTokenManagement.Tests.StoreTokensInAuthenticationPropertiesTests

✅ Removing_all_tokens_in_a_challenge_scheme_should_remove_items_shared_in_that_scheme
✅ Should_be_able_to_remove_tokens
✅ Should_be_able_to_remove_tokens_for_multiple_schemes_and_resources_at_the_same_time
✅ Should_be_able_to_store_and_retrieve_tokens
✅ Should_be_able_to_store_and_retrieve_tokens_for_multiple_challenge_schemes
✅ Should_be_able_to_store_and_retrieve_tokens_for_multiple_resources
✅ Should_be_able_to_store_and_retrieve_tokens_for_multiple_schemes_and_resources_at_the_same_time

❌ Duende.AccessTokenManagement.Tests.UserTokenManagementTests

✅ Anonymous_user_should_return_client_token
✅ Anonymous_user_should_return_user_token_error
❌ Missing_expires_in_should_result_in_long_lived_token
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
❌ Missing_initial_refresh_token_and_expired_access_token_should_return_initial_access_token
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
❌ Missing_initial_refresh_token_response_should_return_access_token
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
❌ Multiple_users_have_distinct_tokens_across_refreshes
	System.Text.Json.JsonException : The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
	---- System.Text.Json.JsonReaderException : The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
❌ Refresh_responses_without_refresh_token_use_old_refresh_token
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
❌ Resources_get_distinct_tokens
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
❌ Short_token_lifetime_should_trigger_refresh
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
❌ Standard_initial_token_response_should_return_expected_values
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.

❌ Duende.AccessTokenManagement.Tests.UserTokenManagementWithDPoPTests

✅ dpop_jtk_is_attached_to_authorize_requests
❌ dpop_nonce_is_respected_during_code_exchange
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
❌ dpop_token_refresh_should_succeed
	System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.

Annotations

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Missing_expires_in_should_result_in_long_lived_token

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Missing_expires_in_should_result_in_long_lived_token() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 106
--- End of stack trace from previous location ---

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Missing_initial_refresh_token_and_expired_access_token_should_return_initial_access_token

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Missing_initial_refresh_token_and_expired_access_token_should_return_initial_access_token() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 172
--- End of stack trace from previous location ---

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Missing_initial_refresh_token_response_should_return_access_token

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Missing_initial_refresh_token_response_should_return_access_token() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 139
--- End of stack trace from previous location ---

Check failure on line 410 in access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Multiple_users_have_distinct_tokens_across_refreshes

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.Text.Json.JsonException : The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
  ---- System.Text.Json.JsonReaderException : The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
Raw output
System.Text.Json.JsonException : The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.
---- System.Text.Json.JsonReaderException : The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, JsonSerializerOptions options, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Multiple_users_have_distinct_tokens_across_refreshes() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 410
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Refresh_responses_without_refresh_token_use_old_refresh_token

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Refresh_responses_without_refresh_token_use_old_refresh_token() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 394
--- End of stack trace from previous location ---

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Resources_get_distinct_tokens

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Resources_get_distinct_tokens() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 324
--- End of stack trace from previous location ---

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Short_token_lifetime_should_trigger_refresh

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Short_token_lifetime_should_trigger_refresh() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 241
--- End of stack trace from previous location ---

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementTests ► Standard_initial_token_response_should_return_expected_values

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementTests.Standard_initial_token_response_should_return_expected_values() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementTests.cs:line 62
--- End of stack trace from previous location ---

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementWithDPoPTests ► dpop_nonce_is_respected_during_code_exchange

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementWithDPoPTests.dpop_nonce_is_respected_during_code_exchange() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementWithDPoPTests.cs:line 111
--- End of stack trace from previous location ---

Check failure on line 140 in access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs

See this annotation in the file changed.

@github-actions github-actions / Test Report - AccessTokenManagement.Tests

Duende.AccessTokenManagement.Tests.UserTokenManagementWithDPoPTests ► dpop_token_refresh_should_succeed

Failed test found in:
  access-token-management/test/AccessTokenManagement.Tests/TestResults/Tests.trx
Error:
  System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
Raw output
System.InvalidOperationException : No service for type 'AuthenticateResultCache' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Duende.AccessTokenManagement.OpenIdConnect.AuthenticationSessionUserAccessTokenStore.GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/AuthenticationSessionUserTokenStore.cs:line 46
   at Duende.AccessTokenManagement.OpenIdConnect.UserAccessAccessTokenManagementService.GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/UserAccessTokenManagementService.cs:line 66
   at Microsoft.AspNetCore.Authentication.TokenManagementHttpContextExtensions.GetUserAccessTokenAsync(HttpContext httpContext, UserTokenRequestParameters parameters, CancellationToken cancellationToken) in /_/access-token-management/src/AccessTokenManagement.OpenIdConnect/TokenManagementHttpContextExtensions.cs:line 31
   at Duende.AccessTokenManagement.Tests.AppHost.<>c.<<Configure>b__10_3>d.MoveNext() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/AppHost.cs:line 140
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.TestHost.HttpContextBuilder.<>c__DisplayClass23_0.<<SendAsync>g__RunRequestAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.TestHost.ClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Duende.AccessTokenManagement.Tests.TestBrowserClient.CookieHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/Framework/TestBrowserClient.cs:line 33
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Duende.AccessTokenManagement.Tests.UserTokenManagementWithDPoPTests.dpop_token_refresh_should_succeed() in /home/runner/work/foss/foss/access-token-management/test/AccessTokenManagement.Tests/UserTokenManagementWithDPoPTests.cs:line 45
--- End of stack trace from previous location ---