From 7de052c6253b815d15e1f3d4497a56e4acb032d7 Mon Sep 17 00:00:00 2001 From: Damian Hickey Date: Sun, 22 Feb 2026 09:20:42 +0100 Subject: [PATCH] Rename CT alias to Ct --- .../DPoP/DPoPProofValidator.cs | 4 +-- .../DPoP/IDPoPProofValidator.cs | 2 +- .../DPoP/IReplayCache.cs | 4 +-- .../DPoP/ReplayCache.cs | 4 +-- .../TestFramework/TestBrowserClient.cs | 2 +- .../TestFramework/TestHybridCache.cs | 10 +++---- .../TestFramework/TestReplayCache.cs | 4 +-- .../ImpersonationAccessTokenRetriever.cs | 2 +- .../ImpersonationAccessTokenRetriever.cs | 2 +- bff/hosts/Hosts.Bff.MultiFrontend/Program.cs | 4 +-- .../Services/ApiHostedService.cs | 2 +- .../Services/BffService.cs | 2 +- .../Services/IdentityServerService.cs | 2 +- bff/hosts/Hosts.ServiceDefaults/Extensions.cs | 2 +- .../Bff.Benchmarks/Hosts/CookieHandler.cs | 2 +- .../Bff.Benchmarks/Hosts/RedirectHandler.cs | 2 +- .../Hosts/RoutingMessageHandler.cs | 4 +-- .../Bff.Benchmarks/Hosts/SimulatedInternet.cs | 2 +- .../TestInfra/AutoFollowRedirectHandler.cs | 2 +- .../TestInfra/CloningHttpMessageHandler.cs | 2 +- .../TestInfra/RequestLoggingHandler.cs | 2 +- .../Internals/AntiforgeryHandler.cs | 2 +- .../BffServerAuthenticationStateProvider.cs | 2 +- bff/src/Bff.Blazor/ServerSideTokenStore.cs | 6 ++-- .../Bff.EntityFramework/ISessionDbContext.cs | 2 +- .../Internal/UserSessionStore.cs | 14 ++++----- .../Bff.Yarp/Internal/RemoteRouteHandler.cs | 2 +- .../IAccessTokenRetriever.cs | 2 +- .../Bff/Diagnostics/DiagnosticDataService.cs | 2 +- .../Diagnostics/DiagnosticHostedService.cs | 4 +-- bff/src/Bff/Diagnostics/DiagnosticSummary.cs | 2 +- .../DynamicFrontends/IIndexHtmlTransformer.cs | 2 +- .../DynamicFrontends/IStaticFilesClient.cs | 4 +-- .../Internal/BffCacheClearingHostedService.cs | 6 ++-- .../Internal/StaticFilesHttpClient.cs | 4 +-- bff/src/Bff/Endpoints/IBffEndpoint.cs | 2 +- .../Endpoints/IUserEndpointClaimsEnricher.cs | 2 +- .../DefaultBackchannelLogoutEndpoint.cs | 4 +-- .../Internal/DefaultDiagnosticsEndpoint.cs | 2 +- .../Internal/DefaultLoginEndpoint.cs | 4 +-- .../Internal/DefaultLogoutEndpoint.cs | 2 +- .../DefaultSilentLoginCallbackEndpoint.cs | 2 +- .../Internal/DefaultSilentLoginEndpoint.cs | 2 +- .../Endpoints/Internal/DefaultUserEndpoint.cs | 6 ++-- bff/src/Bff/HttpContextExtensions.cs | 2 +- .../Internal/DefaultAccessTokenRetriever.cs | 2 +- .../Revocation/ISessionRevocationService.cs | 2 +- .../Revocation/NopSessionRevocationService.cs | 2 +- .../Revocation/SessionRevocationService.cs | 2 +- .../SessionStore/IUserSessionStore.cs | 12 ++++---- .../SessionStore/IUserSessionStoreCleanup.cs | 2 +- .../SessionStore/InMemoryUserSessionStore.cs | 12 ++++---- .../SessionStore/SessionCleanupHost.cs | 6 ++-- .../TicketStore/IServerTicketStore.cs | 2 +- .../TicketStore/ServerSideTicketStore.cs | 4 +-- bff/test/Bff.Tests/BffFrontendIndexTests.cs | 2 +- bff/test/Bff.Tests/BffFrontendSigninTests.cs | 2 +- bff/test/Bff.Tests/BffRemoteApiTests.cs | 4 +-- bff/test/Bff.Tests/BffScenarioTests.cs | 2 +- .../BffWithoutExplicitFrontendTests.cs | 2 +- .../Blazor/Client/AntiforgeryHandlerTests.cs | 4 +-- .../Blazor/Client/FetchUserServiceTests.cs | 2 +- bff/test/Bff.Tests/ConventionTests.cs | 8 ++--- .../Endpoints/Management/UserEndpointTests.cs | 2 +- ...ccessTokenRetriever_Extensibility_tests.cs | 2 +- .../ServerSideTokenStoreTests.cs | 4 +-- .../FailureAccessTokenRetriever.cs | 2 +- .../MockSessionRevocationService.cs | 2 +- .../TestFramework/TestAccessTokenRetriever.cs | 2 +- .../TestFramework/TestBrowserClient.cs | 6 ++-- bff/test/Bff.Tests/TestInfra/BffHttpClient.cs | 4 +-- bff/test/Bff.Tests/TestInfra/CookieHandler.cs | 2 +- .../Bff.Tests/TestInfra/RedirectHandler.cs | 2 +- .../TestInfra/RoutingMessageHandler.cs | 4 +-- .../Bff.Tests/TestInfra/SimulatedInternet.cs | 2 +- .../Bff.Tests/TestInfra/TestHybridCache.cs | 10 +++---- .../Bff.Tests/TestInfra/TestTokenRetriever.cs | 2 +- .../Endpoints/ConformanceReportEndpoint.cs | 2 +- .../ConformanceReportEndpointExtensions.cs | 2 +- .../IConformanceReportClientStore.cs | 2 +- .../ConformanceReportAssessmentService.cs | 4 +-- .../Sources/Blog/BlogSearchTool.cs | 4 +-- .../Sources/Docs/DocsSearchTool.cs | 4 +-- .../Sources/Samples/SamplesSearchTool.cs | 6 ++-- .../aspire/ServiceDefaults/Extensions.cs | 2 +- .../clients/src/ConsoleCode/SystemBrowser.cs | 2 +- .../src/ConsolePrivateKeyJwtClient/Program.cs | 2 +- .../SystemBrowser.cs | 2 +- .../clients/src/MvcDPoP/TestHandler.cs | 2 +- .../src/MvcJarJwt/ClientAssertionService.cs | 2 +- .../MvcJarUriJwt/ClientAssertionService.cs | 2 +- .../clients/src/Web/ClientAssertionService.cs | 2 +- .../CallbackManager.cs | 4 +-- .../TestOperationalStoreNotification.cs | 6 ++-- .../Shared/Configuration/ClientsConsole.cs | 2 +- .../CustomClientRegistrationProcessor.cs | 2 +- .../Customization/DiscoveryHealthCheck.cs | 4 +-- .../Customization/ExtensionGrantValidator.cs | 2 +- .../Customization/HostProfileService.cs | 2 +- .../NoSubjectExtensionGrantValidator.cs | 2 +- ...ParameterizedScopeTokenRequestValidator.cs | 2 +- .../Pages/Account/Login/Index.cshtml.cs | 2 +- .../Main/Pages/Account/Login/Index.cshtml.cs | 2 +- .../DefaultSessionClaimsFilter.cs | 2 +- .../AspNetIdentity/ISessionClaimsFilter.cs | 2 +- .../src/AspNetIdentity/ProfileService.cs | 4 +-- .../ResourceOwnerPasswordValidator.cs | 2 +- .../ClientConfigurationStore.cs | 2 +- ...namicClientRegistrationRequestProcessor.cs | 4 +-- ...namicClientRegistrationRequestProcessor.cs | 2 +- ...amicClientRegistrationResponseGenerator.cs | 10 +++---- ...amicClientRegistrationResponseGenerator.cs | 10 +++---- .../Stores/IClientConfigurationStore.cs | 2 +- .../InMemoryClientConfigurationStore.cs | 2 +- .../DynamicClientRegistrationValidator.cs | 30 +++++++++---------- .../IDynamicClientRegistrationValidator.cs | 2 +- .../Extensions/DbContextExtensions.cs | 2 +- .../Interfaces/IConfigurationDbContext.cs | 4 +-- .../Interfaces/IPersistedGrantDbContext.cs | 4 +-- .../Stores/ClientStore.cs | 4 +-- .../Stores/DeviceFlowStore.cs | 10 +++---- .../Stores/IdentityProviderStore.cs | 4 +-- .../Stores/PersistedGrantStore.cs | 10 +++---- .../Stores/PushedAuthorizationRequestStore.cs | 6 ++-- .../Stores/ResourceStore.cs | 10 +++---- .../Stores/ServerSideSessionStore.cs | 20 ++++++------- .../Stores/SigningKeyStore.cs | 6 ++-- .../IOperationalStoreNotification.cs | 4 +-- .../TokenCleanup/ITokenCleanupService.cs | 2 +- .../TokenCleanup/TokenCleanupService.cs | 12 ++++---- .../Services/CorsPolicyService.cs | 2 +- .../src/EntityFramework/TokenCleanupHost.cs | 8 ++--- .../Endpoints/AuthorizeEndpointBase.cs | 8 ++--- .../Endpoints/BaseDiscoveryEndpoint.cs | 2 +- .../Endpoints/Results/AuthorizeResult.cs | 2 +- .../Endpoints/Results/CheckSessionResult.cs | 2 +- .../Results/EndSessionCallbackResult.cs | 2 +- .../Extensions/IClientStoreExtensions.cs | 2 +- .../Extensions/IResourceStoreExtensions.cs | 10 +++---- .../NameValueCollectionExtensions.cs | 2 +- .../Store/CachingIdentityProviderStore.cs | 4 +-- .../Store/InMemoryIdentityProviderStore.cs | 4 +-- .../Store/NonCachingIdentityProviderStore.cs | 4 +-- .../Store/NopIdentityProviderStore.cs | 4 +-- .../Store/ValidatingIdentityProviderStore.cs | 4 +-- .../Hosting/ServerSideSessionCleanupHost.cs | 6 ++-- .../src/IdentityServer/IdentityServerTools.cs | 16 +++++----- .../V2/Diagnostics/DiagnosticHostedService.cs | 6 ++-- .../V2/Diagnostics/DiagnosticSummary.cs | 2 +- .../Models/TokenRequestValidationLog.cs | 2 +- .../AuthorizeInteractionResponseGenerator.cs | 8 ++--- .../Default/AuthorizeResponseGenerator.cs | 10 +++---- ...kchannelAuthenticationResponseGenerator.cs | 2 +- .../DeviceAuthorizationResponseGenerator.cs | 2 +- .../Default/DiscoveryResponseGenerator.cs | 4 +-- .../Default/IntrospectionResponseGenerator.cs | 4 +-- .../PushedAuthorizationResponseGenerator.cs | 2 +- .../Default/TokenResponseGenerator.cs | 22 +++++++------- .../TokenRevocationResponseGenerator.cs | 6 ++-- .../Default/UserInfoResponseGenerator.cs | 4 +-- .../IAuthorizeInteractionResponseGenerator.cs | 2 +- .../IAuthorizeResponseGenerator.cs | 2 +- ...kchannelAuthenticationResponseGenerator.cs | 2 +- .../IDeviceAuthorizationResponseGenerator.cs | 2 +- .../IDiscoveryResponseGenerator.cs | 4 +-- .../IIntrospectionResponseGenerator.cs | 2 +- .../IPushedAuthorizationResponseGenerator.cs | 2 +- .../ITokenResponseGenerator.cs | 2 +- .../ITokenRevocationResponseGenerator.cs | 2 +- .../IUserInfoResponseGenerator.cs | 2 +- .../Default/BackChannelLogoutHttpClient.cs | 2 +- .../DefaultBackChannelLogoutService.cs | 10 +++---- ...channelAuthenticationInteractionService.cs | 8 ++--- .../Services/Default/DefaultCache.cs | 8 ++--- .../Services/Default/DefaultClaimsService.cs | 4 +-- .../Services/Default/DefaultConsentService.cs | 4 +-- .../Default/DefaultCorsPolicyService.cs | 2 +- .../Default/DefaultDeviceFlowCodeService.cs | 10 +++---- .../DefaultDeviceFlowInteractionService.cs | 4 +-- .../Services/Default/DefaultEventService.cs | 4 +-- .../Services/Default/DefaultEventSink.cs | 2 +- .../Default/DefaultHandleGenerationService.cs | 2 +- ...DefaultIdentityServerInteractionService.cs | 18 +++++------ .../Default/DefaultIssuerNameService.cs | 2 +- .../Default/DefaultJwtRequestUriHttpClient.cs | 2 +- .../Default/DefaultKeyMaterialService.cs | 6 ++-- .../Default/DefaultPersistedGrantService.cs | 4 +-- .../Services/Default/DefaultProfileService.cs | 4 +-- .../Default/DefaultRefreshTokenService.cs | 6 ++-- .../Services/Default/DefaultReplayCache.cs | 4 +-- .../DefaultSessionCoordinationService.cs | 8 ++--- .../DefaultSessionManagementService.cs | 4 +-- .../Default/DefaultTokenCreationService.cs | 4 +-- .../Services/Default/DefaultTokenService.cs | 6 ++-- .../Default/DefaultUiLocalesService.cs | 2 +- .../Default/DefaultUserCodeService.cs | 2 +- .../Services/Default/DefaultUserSession.cs | 14 ++++----- ...kchannelAuthenticationThrottlingService.cs | 2 +- .../DistributedDeviceFlowThrottlingService.cs | 2 +- .../AutomaticKeyManagerKeyStore.cs | 14 ++++----- .../KeyManagement/FileSystemKeyStore.cs | 6 ++-- .../Default/KeyManagement/IKeyManager.cs | 4 +-- .../Default/KeyManagement/IKeyStoreCache.cs | 4 +-- .../KeyManagement/InMemoryKeyStoreCache.cs | 4 +-- .../Default/KeyManagement/KeyManager.cs | 20 ++++++------- .../Default/KeyManagement/NopKeyStoreCache.cs | 4 +-- .../Default/LogoutNotificationService.cs | 4 +-- ...elAuthenticationUserNotificationService.cs | 2 +- .../Default/NumericUserCodeGenerator.cs | 2 +- .../Services/Default/OidcReturnUrlParser.cs | 2 +- .../Default/PushedAuthorizationService.cs | 6 ++-- .../Services/Default/ReturnUrlParser.cs | 2 +- .../ServerSideSessionRefreshTokenService.cs | 6 ++-- .../Services/DiagnosticDataService.cs | 4 +-- .../Services/IBackChannelLogoutHttpClient.cs | 2 +- .../Services/IBackChannelLogoutService.cs | 2 +- ...channelAuthenticationInteractionService.cs | 6 ++-- ...kchannelAuthenticationThrottlingService.cs | 2 +- ...elAuthenticationUserNotificationService.cs | 2 +- .../src/IdentityServer/Services/ICache.cs | 8 ++--- .../IdentityServer/Services/IClaimsService.cs | 4 +-- .../Services/IConsentService.cs | 4 +-- .../Services/IDeviceFlowCodeService.cs | 10 +++---- .../Services/IDeviceFlowInteractionService.cs | 4 +-- .../Services/IDeviceFlowThrottlingService.cs | 2 +- .../IdentityServer/Services/IEventService.cs | 2 +- .../src/IdentityServer/Services/IEventSink.cs | 2 +- .../Services/IHandleGenerationService.cs | 2 +- .../IIdentityServerInteractionService.cs | 18 +++++------ .../Services/IIssuerNameService.cs | 2 +- .../Services/IJwtRequestUriHttpClient.cs | 2 +- .../Services/IKeyMaterialService.cs | 6 ++-- .../Services/ILogoutNotificationService.cs | 4 +-- .../Services/IPersistedGrantService.cs | 4 +-- .../Services/IProfileService.cs | 4 +-- .../Services/IPushedAuthorizationService.cs | 6 ++-- .../Services/IRefreshTokenService.cs | 6 ++-- .../IdentityServer/Services/IReplayCache.cs | 4 +-- .../Services/IReturnUrlParser.cs | 2 +- .../Services/ISessionCoordinationService.cs | 6 ++-- .../Services/ISessionManagementService.cs | 4 +-- .../Services/ITokenCreationService.cs | 2 +- .../IdentityServer/Services/ITokenService.cs | 6 ++-- .../Services/IUiLocalesService.cs | 2 +- .../Services/IUserCodeGenerator.cs | 2 +- .../Services/IUserCodeService.cs | 2 +- .../IdentityServer/Services/IUserSession.cs | 14 ++++----- .../InMemory/InMemoryCorsPolicyService.cs | 2 +- .../Stores/Caching/CachingClientStore.cs | 4 +-- .../Caching/CachingCorsPolicyService.cs | 2 +- .../Stores/Caching/CachingResourceStore.cs | 14 ++++----- .../Stores/Default/ConsentMessageStore.cs | 6 ++-- .../Default/DefaultAuthorizationCodeStore.cs | 6 ++-- ...ltBackChannelAuthenticationRequestStore.cs | 12 ++++---- .../Stores/Default/DefaultGrantStore.cs | 20 ++++++------- .../Default/DefaultReferenceTokenStore.cs | 8 ++--- .../Default/DefaultRefreshTokenStore.cs | 10 +++---- .../Stores/Default/DefaultUserConsentStore.cs | 6 ++-- ...acheAuthorizationParametersMessageStore.cs | 6 ++-- .../Default/ProtectedDataMessageStore.cs | 4 +-- ...ringAuthorizationParametersMessageStore.cs | 6 ++-- .../Stores/Default/ServerSideTicketStore.cs | 6 ++-- .../Stores/Empty/EmptyClientStore.cs | 4 +-- .../Stores/Empty/EmptyResourceStore.cs | 10 +++---- .../IAuthorizationParametersMessageStore.cs | 6 ++-- .../Stores/IConsentMessageStore.cs | 6 ++-- .../IdentityServer/Stores/IMessageStore.cs | 4 +-- .../Stores/IServerSideTicketStore.cs | 6 ++-- .../Stores/ISigningCredentialStore.cs | 2 +- .../Stores/IValidationKeysStore.cs | 2 +- .../Stores/InMemory/InMemoryClientStore.cs | 4 +-- .../InMemory/InMemoryDeviceFlowStore.cs | 10 +++---- .../InMemory/InMemoryPersistedGrantStore.cs | 10 +++---- ...InMemoryPushedAuthorizationRequestStore.cs | 6 ++-- .../Stores/InMemory/InMemoryResourcesStore.cs | 10 +++---- .../InMemoryServerSideSessionStore.cs | 16 +++++----- .../InMemorySigningCredentialsStore.cs | 2 +- .../InMemory/InMemoryValidationKeysStore.cs | 2 +- .../Stores/ValidatingClientStore.cs | 4 +-- .../Test/TestBackchannelLoginUserValidator.cs | 2 +- .../Test/TestUserProfileService.cs | 4 +-- .../TestUserResourceOwnerPasswordValidator.cs | 2 +- .../Validation/Default/ApiSecretValidator.cs | 6 ++-- .../Default/AuthorizeRequestValidator.cs | 10 +++---- ...channelAuthenticationRequestIdValidator.cs | 2 +- ...ckchannelAuthenticationRequestValidator.cs | 4 +-- .../BasicAuthenticationSecretParser.cs | 2 +- .../Default/ClientSecretValidator.cs | 6 ++-- .../DefaultClientConfigurationValidator.cs | 2 +- .../DefaultCustomAuthorizeRequestValidator.cs | 2 +- ...ustomBackchannelAuthenticationValidator.cs | 2 +- .../DefaultCustomTokenRequestValidator.cs | 2 +- .../Default/DefaultCustomTokenValidator.cs | 4 +-- .../Default/DefaultDPoPProofValidator.cs | 6 ++-- ...tIdentityProviderConfigurationValidator.cs | 2 +- .../Default/DefaultIssuerPathValidator.cs | 2 +- .../Default/DefaultResourceValidator.cs | 2 +- .../DeviceAuthorizationRequestValidator.cs | 4 +-- .../Validation/Default/DeviceCodeValidator.cs | 2 +- .../Default/EndSessionRequestValidator.cs | 4 +-- .../Default/ExtensionGrantValidator.cs | 2 +- .../Default/HashedSharedSecretValidator.cs | 2 +- .../Default/IntrospectionRequestValidator.cs | 8 ++--- .../JwtBearerClientAssertionSecretParser.cs | 2 +- .../Validation/Default/JwtRequestValidator.cs | 6 ++-- .../Default/MutualTlsSecretParser.cs | 2 +- ...pBackchannelAuthenticationUserValidator.cs | 2 +- .../NopClientConfigurationValidator.cs | 2 +- ...upportedResouceOwnerCredentialValidator.cs | 2 +- .../Default/PlainTextSharedSecretValidator.cs | 2 +- .../Default/PostBodySecretParser.cs | 2 +- .../Default/PrivateKeyJwtSecretValidator.cs | 2 +- .../PushedAuthorizationRequestValidator.cs | 2 +- .../Default/RequestObjectValidator.cs | 8 ++--- .../Validation/Default/SecretParser.cs | 2 +- .../Validation/Default/SecretValidator.cs | 2 +- .../Default/StrictRedirectUriValidator.cs | 4 +-- .../StrictRedirectUriValidatorAppAuth.cs | 4 +-- .../Default/TokenRequestValidator.cs | 4 +-- .../TokenRevocationRequestValidator.cs | 2 +- .../Validation/Default/TokenValidator.cs | 8 ++--- .../Default/UserInfoRequestValidator.cs | 2 +- .../Default/X509NameSecretValidator.cs | 2 +- .../Default/X509ThumbprintSecretValidator.cs | 2 +- .../Validation/IApiSecretValidator.cs | 2 +- .../Validation/IAuthorizeRequestValidator.cs | 2 +- ...channelAuthenticationRequestIdValidator.cs | 2 +- ...ckchannelAuthenticationRequestValidator.cs | 2 +- ...IBackchannelAuthenticationUserValidator.cs | 2 +- .../IClientConfigurationValidator.cs | 2 +- .../Validation/IClientSecretValidator.cs | 2 +- .../ICustomAuthorizeRequestValidator.cs | 2 +- ...ustomBackchannelAuthenticationValidator.cs | 2 +- .../ICustomTokenRequestValidator.cs | 2 +- .../Validation/ICustomTokenValidator.cs | 4 +-- .../Validation/IDPoPProofValidator.cs | 2 +- .../IDeviceAuthorizationRequestValidator.cs | 2 +- .../Validation/IDeviceCodeValidator.cs | 2 +- .../Validation/IEndSessionRequestValidator.cs | 4 +-- .../Validation/IExtensionGrantValidator.cs | 2 +- ...IIdentityProviderConfigurationValidator.cs | 2 +- .../IIntrospectionRequestValidator.cs | 2 +- .../Validation/IIssuerPathValidator.cs | 2 +- .../Validation/IJwtRequestValidator.cs | 2 +- .../IPushedAuthorizationRequestValidator.cs | 2 +- .../Validation/IRedirectUriValidator.cs | 4 +-- .../Validation/IRequestObjectValidator.cs | 6 ++-- .../IResourceOwnerPasswordValidator.cs | 2 +- .../Validation/IResourceValidator.cs | 2 +- .../Validation/ISecretParser.cs | 2 +- .../Validation/ISecretValidator.cs | 2 +- .../Validation/ISecretsListParser.cs | 2 +- .../Validation/ISecretsListValidator.cs | 2 +- .../Validation/ITokenRequestValidator.cs | 2 +- .../ITokenRevocationRequestValidator.cs | 2 +- .../Validation/ITokenValidator.cs | 4 +-- .../Validation/IUserInfoRequestValidator.cs | 2 +- .../Storage/Services/ICorsPolicyService.cs | 2 +- .../Storage/Stores/IAuthorizationCodeStore.cs | 6 ++-- .../IBackChannelAuthenticationRequestStore.cs | 12 ++++---- .../src/Storage/Stores/IClientStore.cs | 4 +-- .../src/Storage/Stores/IDeviceFlowStore.cs | 10 +++---- .../Storage/Stores/IIdentityProviderStore.cs | 4 +-- .../Storage/Stores/IPersistedGrantStore.cs | 10 +++---- .../IPushedAuthorizationRequestStore.cs | 6 ++-- .../Storage/Stores/IReferenceTokenStore.cs | 8 ++--- .../src/Storage/Stores/IRefreshTokenStore.cs | 10 +++---- .../src/Storage/Stores/IResourceStore.cs | 10 +++---- .../Storage/Stores/IServerSideSessionStore.cs | 16 +++++----- .../src/Storage/Stores/ISigningKeyStore.cs | 6 ++-- .../src/Storage/Stores/IUserConsentStore.cs | 6 ++-- .../Pages/Admin/Clients/ClientRepository.cs | 2 +- .../Setup/ConfirmationSecretValidator.cs | 2 +- .../Clients/Setup/CustomProfileService.cs | 2 +- .../CustomResponseExtensionGrantValidator.cs | 2 +- .../CustomResponseResourceOwnerValidator.cs | 2 +- ...DynamicParameterExtensionGrantValidator.cs | 2 +- .../Clients/Setup/ExtensionGrantValidator.cs | 2 +- .../Clients/Setup/ExtensionGrantValidator2.cs | 2 +- .../Setup/NoSubjectExtensionGrantValidator.cs | 2 +- .../Setup/TestCustomTokenRequestValidator.cs | 2 +- .../Common/BrowserHandler.cs | 4 +-- .../Common/IdentityServerPipeline.cs | 2 +- .../Common/MessageHandlerWrapper.cs | 2 +- .../Common/MockCibaUserNotificationService.cs | 2 +- .../Common/MockCibaUserValidator.cs | 2 +- ...ustomBackchannelAuthenticationValidator.cs | 2 +- .../Common/MockResourceValidator.cs | 2 +- .../Common/MtlsMessageHandler.cs | 2 +- .../Common/MtlsTestMiddleware.cs | 2 +- .../Common/NetworkHandler.cs | 2 +- .../DynamicClientRegistrationTests.cs | 2 +- .../ConformanceReportIntegrationTests.cs | 2 +- .../Endpoints/Authorize/AuthorizeTests.cs | 2 +- .../Endpoints/Authorize/ConsentTests.cs | 2 +- .../Authorize/PushedAuthorizationTests.cs | 2 +- .../Endpoints/Ciba/CibaTests.cs | 2 +- .../Endpoints/Token/CibaTokenEndpointTests.cs | 2 +- .../EntityFrameworkBasedLogoutTests.cs | 2 +- .../NetworkDelaySimulationInterceptor.cs | 2 +- .../Services/CorsPolicyServiceTests.cs | 2 +- .../MockOperationalStoreNotification.cs | 4 +-- .../Storage/Stores/ClientStoreTests.cs | 2 +- .../Storage/Stores/DeviceFlowStoreTests.cs | 2 +- .../Stores/IdentityProviderStoreTests.cs | 2 +- .../Stores/PersistedGrantStoreTests.cs | 2 +- .../Storage/Stores/ResourceStoreTests.cs | 2 +- .../Storage/TokenCleanup/TokenCleanupTests.cs | 2 +- .../CustomAuthorizeResponseGeneratorTests.cs | 2 +- .../Extensibility/CustomClaimsServiceTests.cs | 2 +- .../CustomProfileServiceTests.cs | 4 +-- .../Hosting/CorsTests.cs | 2 +- .../Hosting/DynamicProvidersTests.cs | 2 +- .../Hosting/ServerSideSessionTests.cs | 2 +- .../TestFramework/TestBrowserClient.cs | 2 +- .../TestHosts/IdentityServerHost.cs | 2 +- .../DefaultSessionClaimsFilterTests.cs | 2 +- .../Caches/MockCache.cs | 8 ++--- .../Caches/ResourceStoreCacheTests.cs | 2 +- ...ckBackChannelAuthenticationRequestStore.cs | 12 ++++---- .../Common/MockCache.cs | 8 ++--- .../Common/MockClaimsService.cs | 4 +-- .../Common/MockConsentMessageStore.cs | 6 ++-- .../Common/MockConsentService.cs | 4 +-- .../Common/MockEventSink.cs | 2 +- .../Common/MockJwtRequestUriHttpClient.cs | 2 +- .../Common/MockKeyMaterialService.cs | 6 ++-- .../Common/MockLogoutNotificationService.cs | 4 +-- .../Common/MockMessageStore.cs | 4 +-- .../Common/MockPersistedGrantService.cs | 4 +-- .../Common/MockProfileService.cs | 4 +-- .../Common/MockReferenceTokenStore.cs | 8 ++--- .../Common/MockReplayCache.cs | 4 +-- .../Common/MockResourceValidator.cs | 2 +- .../Common/MockReturnUrlParser.cs | 2 +- .../Common/MockTokenCreationService.cs | 2 +- .../Common/MockUiLocaleService.cs | 2 +- .../Common/MockUserSession.cs | 14 ++++----- .../Common/NetworkHandler.cs | 2 +- .../Common/StubAuthorizeResponseGenerator.cs | 2 +- .../Common/StubHandleGenerationService.cs | 2 +- .../Common/StubSessionCoordinationService.cs | 6 ++-- .../Common/TestEventService.cs | 2 +- .../Common/TestReplayCache.cs | 4 +-- .../Common/TestUserConsentStore.cs | 6 ++-- .../Cors/MockCorsPolicyService.cs | 2 +- .../Authorize/AuthorizeEndpointBaseTests.cs | 2 +- ...ubAuthorizeInteractionResponseGenerator.cs | 2 +- .../StubAuthorizeRequestValidator.cs | 2 +- .../EndSession/StubBackChannelLogoutClient.cs | 2 +- .../StubEndSessionRequestValidator.cs | 4 +-- .../Endpoints/Results/AuthorizeResultTests.cs | 2 +- .../Token/StubClientSecretValidator.cs | 2 +- .../Token/StubTokenRequestValidator.cs | 2 +- .../Token/StubTokenResponseGenerator.cs | 2 +- .../IResourceStoreExtensionsTests.cs | 12 ++++---- ...yServerBuilderExtensionsCacheStoreTests.cs | 14 ++++----- ...ntityServerBuilderExtensionsCryptoTests.cs | 2 +- .../Licensing/v2/DiagnosticSummaryTests.cs | 2 +- .../Licensing/v2/LicenseAccessorTests.cs | 4 +-- .../v2/LicenseExpirationCheckerTests.cs | 4 +-- .../Licensing/v2/LicenseUsageTests.cs | 2 +- ...horizeInteractionResponseGeneratorTests.cs | 2 +- ...teractionResponseGeneratorTests_Consent.cs | 2 +- ...nteractionResponseGeneratorTests_Custom.cs | 6 ++-- ...InteractionResponseGeneratorTests_Login.cs | 2 +- ...viceAuthorizationResponseGeneratorTests.cs | 4 +-- .../UserInfoResponseGeneratorTests.cs | 2 +- .../DefaultBackChannelLogoutServiceTests.cs | 4 +-- ...elAuthenticationInteractionServiceTests.cs | 2 +- .../Default/DefaultClaimsServiceTests.cs | 2 +- .../Default/DefaultConsentServiceTests.cs | 2 +- .../Default/DefaultCorsPolicyServiceTests.cs | 2 +- .../Default/DefaultEventServiceTests.cs | 2 +- ...ltIdentityServerInteractionServiceTests.cs | 2 +- .../DefaultPersistedGrantServiceTests.cs | 12 ++++---- .../DefaultRefreshTokenServiceTests.cs | 2 +- .../DefaultSessionCoordinationServiceTests.cs | 2 +- .../Default/DefaultTokenServiceTests.cs | 2 +- .../Default/DefaultUiLocalesServiceTests.cs | 2 +- .../Default/DefaultUserSessionTests.cs | 2 +- ...ributedDeviceFlowThrottlingServiceTests.cs | 2 +- .../InMemoryKeyStoreCacheTests.cs | 2 +- .../Default/KeyManagement/KeyManagerTests.cs | 2 +- .../KeyManagement/MockSigningKeyStore.cs | 6 ++-- .../KeyManagement/MockSigningKeyStoreCache.cs | 4 +-- .../Default/NumericUserCodeServiceTests.cs | 2 +- .../Services/DiagnosticDataServiceTests.cs | 2 +- .../InMemory/InMemoryCorsPolicyService.cs | 2 +- .../Default/CachingResourceStoreTests.cs | 2 +- .../DefaultPersistedGrantStoreTests.cs | 2 +- ...uthorizationParametersMessageStoreTests.cs | 2 +- .../Stores/InMemoryClientStoreTests.cs | 2 +- .../Stores/InMemoryDeviceFlowStoreTests.cs | 2 +- .../InMemoryPersistedGrantStoreTests.cs | 2 +- .../Stores/ValidatingClientStoreTests.cs | 10 +++---- .../Validation/AccessTokenValidation.cs | 2 +- .../Authorize_ClientValidation_Code.cs | 2 +- .../Authorize_ClientValidation_IdToken.cs | 2 +- .../Authorize_ClientValidation_Invalid.cs | 2 +- .../Authorize_ClientValidation_Token.cs | 2 +- .../Authorize_ClientValidation_Valid.cs | 2 +- ...rize_ProtocolValidation_CustomValidator.cs | 2 +- .../Authorize_ProtocolValidation_Resources.cs | 2 +- .../Authorize_ProtocolValidation_Valid.cs | 2 +- .../Validation/DPoPProofValidatorTests.cs | 2 +- .../Validation/DeviceCodeValidation.cs | 2 +- .../EndSessionRequestValidatorTests.cs | 2 +- .../StubRedirectUriValidator.cs | 2 +- .../StubTokenValidator.cs | 4 +-- .../Validation/IdentityTokenValidation.cs | 2 +- .../IntrospectionRequestValidatorTests.cs | 2 +- .../Validation/IsLocalUrlTests.cs | 2 +- .../Validation/ResourceValidation.cs | 2 +- .../BasicAuthenticationCredentialParsing.cs | 2 +- .../Secrets/ClientAssertionSecretParsing.cs | 2 +- .../Secrets/FormPostCredentialParsing.cs | 2 +- .../Secrets/HashedSharedSecretValidation.cs | 2 +- .../Secrets/MutualTlsSecretValidation.cs | 2 +- .../PlainTextClientSecretValidation.cs | 2 +- .../Secrets/PrivateKeyJwtSecretValidation.cs | 2 +- .../Validation/Secrets/SecretValidation.cs | 2 +- ...channelAuthenticationRequestIdValidator.cs | 2 +- .../Setup/TestDeviceCodeValidator.cs | 2 +- .../Setup/TestDeviceFlowThrottlingService.cs | 2 +- .../Validation/Setup/TestGrantValidator.cs | 2 +- .../Validation/Setup/TestIssuerNameService.cs | 2 +- .../Validation/Setup/TestProfileService.cs | 4 +-- .../Setup/TestPushedAuthorizationService.cs | 6 ++-- .../TestResourceOwnerPasswordValidator.cs | 2 +- .../Validation/Setup/TestTokenValidator.cs | 4 +-- ...estValidation_ClientCredentials_Invalid.cs | 2 +- .../TokenRequestValidation_Code_Invalid.cs | 2 +- ...kenRequestValidation_DeviceCode_Invalid.cs | 2 +- ...questValidation_ExtensionGrants_Invalid.cs | 2 +- .../TokenRequestValidation_General_Invalid.cs | 2 +- .../TokenRequestValidation_Invalid.cs | 2 +- .../TokenRequestValidation_PKCE.cs | 2 +- ...nRequestValidation_RefreshToken_Invalid.cs | 2 +- ...RequestValidation_ResourceOwner_Invalid.cs | 2 +- .../TokenRequestValidation_Valid.cs | 2 +- .../Validation/UserInfoRequestValidation.cs | 2 +- shared/Global.cs | 2 +- 543 files changed, 1054 insertions(+), 1054 deletions(-) diff --git a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPProofValidator.cs b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPProofValidator.cs index 65e6485e2..d00a03f73 100644 --- a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPProofValidator.cs +++ b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/DPoPProofValidator.cs @@ -70,7 +70,7 @@ internal class DPoPProofValidator : IDPoPProofValidator /// /// Validates the DPoP proof. /// - public async Task Validate(DPoPProofValidationContext context, CT ct = default) + public async Task Validate(DPoPProofValidationContext context, Ct ct = default) { using var activity = Tracing.ActivitySource.StartActivity("DPoPProofValidator.Validate"); @@ -368,7 +368,7 @@ internal class DPoPProofValidator : IDPoPProofValidator internal async Task ValidateReplay( DPoPProofValidationContext context, DPoPProofValidationResult result, - CT ct = default) + Ct ct = default) { var dPoPOptions = OptionsMonitor.Get(context.Scheme); diff --git a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IDPoPProofValidator.cs b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IDPoPProofValidator.cs index a49515050..9520221f5 100644 --- a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IDPoPProofValidator.cs +++ b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IDPoPProofValidator.cs @@ -11,5 +11,5 @@ public interface IDPoPProofValidator /// /// Validates the DPoP proof. /// - Task Validate(DPoPProofValidationContext context, CT ct = default); + Task Validate(DPoPProofValidationContext context, Ct ct = default); } diff --git a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IReplayCache.cs b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IReplayCache.cs index f8c076fd5..b774ca060 100644 --- a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IReplayCache.cs +++ b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/IReplayCache.cs @@ -11,11 +11,11 @@ public interface IReplayCache /// /// Adds a hashed jti to the cache. /// - Task Add(string jtiHash, TimeSpan expiration, CT ct = default); + Task Add(string jtiHash, TimeSpan expiration, Ct ct = default); /// /// Checks if a cached jti hash exists in the hash. /// - Task Exists(string jtiHash, CT ct = default); + Task Exists(string jtiHash, Ct ct = default); } diff --git a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/ReplayCache.cs b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/ReplayCache.cs index 65690f9f5..6d1ee8bcd 100644 --- a/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/ReplayCache.cs +++ b/aspnetcore-authentication-jwtbearer/src/AspNetCore.Authentication.JwtBearer/DPoP/ReplayCache.cs @@ -24,7 +24,7 @@ internal class ReplayCache(DPoPHybridCacheProvider cacheProvider) : IReplayCache } } - public async Task Add(string handle, TimeSpan expiration, CT ct) + public async Task Add(string handle, TimeSpan expiration, Ct ct) { using var activity = Tracing.ActivitySource.StartActivity("ReplayCache.Add"); @@ -43,7 +43,7 @@ internal class ReplayCache(DPoPHybridCacheProvider cacheProvider) : IReplayCache | HybridCacheEntryFlags.DisableUnderlyingData }; - public async Task Exists(string handle, CT ct) + public async Task Exists(string handle, Ct ct) { using var activity = Tracing.ActivitySource.StartActivity("ReplayCache.Exists"); diff --git a/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestBrowserClient.cs b/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestBrowserClient.cs index 8c2c3019c..b4a5b65c2 100644 --- a/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestBrowserClient.cs +++ b/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestBrowserClient.cs @@ -15,7 +15,7 @@ public class TestBrowserClient : HttpClient public HttpResponseMessage LastResponse { get; private set; } = default!; protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { CurrentUri = request.RequestUri!; var cookieHeader = CookieContainer.GetCookieHeader(request.RequestUri!); diff --git a/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestHybridCache.cs b/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestHybridCache.cs index 4da5065c3..279a85dac 100644 --- a/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestHybridCache.cs +++ b/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestHybridCache.cs @@ -11,8 +11,8 @@ internal class TestHybridCache : HybridCache private readonly List<(string key, object value, HybridCacheEntryOptions? options)> _setAsyncCalls = new(); private readonly List<(string key, HybridCacheEntryOptions? options)> _getOrCreateAsyncCalls = new(); - public override async ValueTask GetOrCreateAsync(string key, TState state, Func> factory, HybridCacheEntryOptions? options = null, - IEnumerable? tags = null, CT ct = new()) + public override async ValueTask GetOrCreateAsync(string key, TState state, Func> factory, HybridCacheEntryOptions? options = null, + IEnumerable? tags = null, Ct ct = new()) { _getOrCreateAsyncCalls.Add((key, options)); @@ -25,16 +25,16 @@ internal class TestHybridCache : HybridCache } public override ValueTask SetAsync(string key, T value, HybridCacheEntryOptions? options = null, IEnumerable? tags = null, - CT ct = new()) + Ct ct = new()) { _setAsyncCalls.Add((key, value!, options)); _cache[key] = value!; return ValueTask.CompletedTask; } - public override ValueTask RemoveAsync(string key, CT ct = new()) => throw new NotImplementedException(); + public override ValueTask RemoveAsync(string key, Ct ct = new()) => throw new NotImplementedException(); - public override ValueTask RemoveByTagAsync(string tag, CT ct = new()) => throw new NotImplementedException(); + public override ValueTask RemoveByTagAsync(string tag, Ct ct = new()) => throw new NotImplementedException(); public IReadOnlyList<(string key, object value, HybridCacheEntryOptions? options)> SetAsyncCalls => _setAsyncCalls; public IReadOnlyList<(string key, HybridCacheEntryOptions? options)> GetOrCreateAsyncCalls => _getOrCreateAsyncCalls; diff --git a/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestReplayCache.cs b/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestReplayCache.cs index 6e0c51784..79a7a0cfd 100644 --- a/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestReplayCache.cs +++ b/aspnetcore-authentication-jwtbearer/test/AspNetCore.Authentication.JwtBearer.Tests/TestFramework/TestReplayCache.cs @@ -14,14 +14,14 @@ public class TestReplayCache : IReplayCache // Configuration for test behavior public Func? ExistsFunc { get; set; } - public Task Add(string jtiHash, TimeSpan expiration, CT ct = default) + public Task Add(string jtiHash, TimeSpan expiration, Ct ct = default) { _addCalls.Add((jtiHash, expiration)); _cache[jtiHash] = (expiration, DateTime.UtcNow); return Task.CompletedTask; } - public Task Exists(string jtiHash, CT ct = default) + public Task Exists(string jtiHash, Ct ct = default) { _existsCalls.Add(jtiHash); diff --git a/bff/hosts/Hosts.Bff.InMemory/ImpersonationAccessTokenRetriever.cs b/bff/hosts/Hosts.Bff.InMemory/ImpersonationAccessTokenRetriever.cs index f1f18da42..bac852ad3 100644 --- a/bff/hosts/Hosts.Bff.InMemory/ImpersonationAccessTokenRetriever.cs +++ b/bff/hosts/Hosts.Bff.InMemory/ImpersonationAccessTokenRetriever.cs @@ -9,7 +9,7 @@ namespace Bff; public class ImpersonationAccessTokenRetriever(IAccessTokenRetriever inner) : IAccessTokenRetriever { - public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, CT ct = default) + public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, Ct ct = default) { var result = await inner.GetAccessTokenAsync(context, ct); diff --git a/bff/hosts/Hosts.Bff.MultiFrontend/ImpersonationAccessTokenRetriever.cs b/bff/hosts/Hosts.Bff.MultiFrontend/ImpersonationAccessTokenRetriever.cs index f1f18da42..bac852ad3 100644 --- a/bff/hosts/Hosts.Bff.MultiFrontend/ImpersonationAccessTokenRetriever.cs +++ b/bff/hosts/Hosts.Bff.MultiFrontend/ImpersonationAccessTokenRetriever.cs @@ -9,7 +9,7 @@ namespace Bff; public class ImpersonationAccessTokenRetriever(IAccessTokenRetriever inner) : IAccessTokenRetriever { - public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, CT ct = default) + public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, Ct ct = default) { var result = await inner.GetAccessTokenAsync(context, ct); diff --git a/bff/hosts/Hosts.Bff.MultiFrontend/Program.cs b/bff/hosts/Hosts.Bff.MultiFrontend/Program.cs index 3296ec36c..7aad37e6e 100644 --- a/bff/hosts/Hosts.Bff.MultiFrontend/Program.cs +++ b/bff/hosts/Hosts.Bff.MultiFrontend/Program.cs @@ -166,7 +166,7 @@ app.MapGet("/local/self-contained", (CurrentFrontendAccessor currentFrontendAcce return data; }); -app.MapGet("/local/invokes-external-api", async (CurrentFrontendAccessor currentFrontendAccessor, IHttpClientFactory httpClientFactory, HttpContext c, CT ct) => +app.MapGet("/local/invokes-external-api", async (CurrentFrontendAccessor currentFrontendAccessor, IHttpClientFactory httpClientFactory, HttpContext c, Ct ct) => { var httpClient = httpClientFactory.CreateClient("api"); var apiResult = await httpClient.GetAsync("/user-token"); @@ -235,7 +235,7 @@ RouteConfig[] BuildYarpRoutes() public class FrontendAwareIndexHtmlTransformer : IIndexHtmlTransformer { - public Task Transform(string indexHtml, BffFrontend frontend, CT ct = default) + public Task Transform(string indexHtml, BffFrontend frontend, Ct ct = default) { indexHtml = indexHtml.Replace("[FrontendName]", frontend.Name); indexHtml = indexHtml.Replace("[Path]", frontend.MatchingCriteria.MatchingPath + "/"); // Note, the path must end with a slash diff --git a/bff/hosts/Hosts.Bff.Performance/Services/ApiHostedService.cs b/bff/hosts/Hosts.Bff.Performance/Services/ApiHostedService.cs index 7ee61e2b1..d3c31553c 100644 --- a/bff/hosts/Hosts.Bff.Performance/Services/ApiHostedService.cs +++ b/bff/hosts/Hosts.Bff.Performance/Services/ApiHostedService.cs @@ -9,7 +9,7 @@ public class ApiHostedService(IOptions apiSettings) : BackgroundSer { public ApiSettings Settings { get; } = apiSettings.Value; - protected override Task ExecuteAsync(CT stoppingToken) + protected override Task ExecuteAsync(Ct stoppingToken) { var builder = WebApplication.CreateBuilder(); builder.AddServiceDefaults(); diff --git a/bff/hosts/Hosts.Bff.Performance/Services/BffService.cs b/bff/hosts/Hosts.Bff.Performance/Services/BffService.cs index 6fcd0ed1c..730540d7c 100644 --- a/bff/hosts/Hosts.Bff.Performance/Services/BffService.cs +++ b/bff/hosts/Hosts.Bff.Performance/Services/BffService.cs @@ -15,7 +15,7 @@ public abstract class BffService(string[] urlConfigKeys, IConfiguration config, public IConfiguration Config { get; } = config; public BffSettings Settings { get; } = bffSettings.Value; - protected override async Task ExecuteAsync(CT stoppingToken) + protected override async Task ExecuteAsync(Ct stoppingToken) { var urls = urlConfigKeys .Select(x => Config[x]) diff --git a/bff/hosts/Hosts.Bff.Performance/Services/IdentityServerService.cs b/bff/hosts/Hosts.Bff.Performance/Services/IdentityServerService.cs index 4d2534b2d..96be741ad 100644 --- a/bff/hosts/Hosts.Bff.Performance/Services/IdentityServerService.cs +++ b/bff/hosts/Hosts.Bff.Performance/Services/IdentityServerService.cs @@ -17,7 +17,7 @@ public class IdentityServerService(IOptions settings, IC { public IdentityServerSettings Settings { get; } = settings.Value; - protected override Task ExecuteAsync(CT stoppingToken) + protected override Task ExecuteAsync(Ct stoppingToken) { var builder = WebApplication.CreateBuilder(); builder.AddServiceDefaults(); diff --git a/bff/hosts/Hosts.ServiceDefaults/Extensions.cs b/bff/hosts/Hosts.ServiceDefaults/Extensions.cs index 4ca3dcf60..482baecd2 100644 --- a/bff/hosts/Hosts.ServiceDefaults/Extensions.cs +++ b/bff/hosts/Hosts.ServiceDefaults/Extensions.cs @@ -85,7 +85,7 @@ public static class Extensions } // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) - //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) + //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECtION_STRING"])) //{ // builder.Services.AddOpenTelemetry() // .UseAzureMonitor(); diff --git a/bff/performance/Bff.Benchmarks/Hosts/CookieHandler.cs b/bff/performance/Bff.Benchmarks/Hosts/CookieHandler.cs index 00bf0059b..1f696bf13 100644 --- a/bff/performance/Bff.Benchmarks/Hosts/CookieHandler.cs +++ b/bff/performance/Bff.Benchmarks/Hosts/CookieHandler.cs @@ -9,7 +9,7 @@ namespace Bff.Benchmarks.Hosts; internal class CookieHandler(HttpMessageHandler innerHandler, CookieContainer cookieContainer) : DelegatingHandler(innerHandler) { - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { var requestUri = request.RequestUri; var header = cookieContainer.GetCookieHeader(requestUri!); diff --git a/bff/performance/Bff.Benchmarks/Hosts/RedirectHandler.cs b/bff/performance/Bff.Benchmarks/Hosts/RedirectHandler.cs index d410a2d5b..3488b4eb4 100644 --- a/bff/performance/Bff.Benchmarks/Hosts/RedirectHandler.cs +++ b/bff/performance/Bff.Benchmarks/Hosts/RedirectHandler.cs @@ -12,7 +12,7 @@ internal class RedirectHandler() : DelegatingHandler public bool AutoFollowRedirects { get; set; } = true; protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { var originalUri = request.RequestUri; diff --git a/bff/performance/Bff.Benchmarks/Hosts/RoutingMessageHandler.cs b/bff/performance/Bff.Benchmarks/Hosts/RoutingMessageHandler.cs index 8458d3628..c0222cf7c 100644 --- a/bff/performance/Bff.Benchmarks/Hosts/RoutingMessageHandler.cs +++ b/bff/performance/Bff.Benchmarks/Hosts/RoutingMessageHandler.cs @@ -27,7 +27,7 @@ internal class RoutingMessageHandler : HttpMessageHandler protected override Task SendAsync( HttpRequestMessage request, - CT ct) + Ct ct) { var host = $"{request.RequestUri?.Host}:{request.RequestUri?.Port}"; @@ -46,7 +46,7 @@ internal class RoutingMessageHandler : HttpMessageHandler { internal Task SuppressedSend( HttpRequestMessage request, - CT ct) + Ct ct) { Task t; if (ExecutionContext.IsFlowSuppressed()) diff --git a/bff/performance/Bff.Benchmarks/Hosts/SimulatedInternet.cs b/bff/performance/Bff.Benchmarks/Hosts/SimulatedInternet.cs index 6e4cc2ee8..1cfaa63a0 100644 --- a/bff/performance/Bff.Benchmarks/Hosts/SimulatedInternet.cs +++ b/bff/performance/Bff.Benchmarks/Hosts/SimulatedInternet.cs @@ -64,7 +64,7 @@ internal class SimulatedInternet : DelegatingHandler protected override async Task SendAsync( HttpRequestMessage request, - CT ct) + Ct ct) { var httpResponseMessage = await base.SendAsync(request, ct); return httpResponseMessage; diff --git a/bff/performance/Bff.Performance/TestInfra/AutoFollowRedirectHandler.cs b/bff/performance/Bff.Performance/TestInfra/AutoFollowRedirectHandler.cs index d33c82d40..56088f197 100644 --- a/bff/performance/Bff.Performance/TestInfra/AutoFollowRedirectHandler.cs +++ b/bff/performance/Bff.Performance/TestInfra/AutoFollowRedirectHandler.cs @@ -8,7 +8,7 @@ namespace Bff.Performance.TestInfra; public class AutoFollowRedirectHandler(Action writeOutput) : DelegatingHandler { protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { var previousUri = request.RequestUri; for (var i = 0; i < 20; i++) diff --git a/bff/performance/Bff.Performance/TestInfra/CloningHttpMessageHandler.cs b/bff/performance/Bff.Performance/TestInfra/CloningHttpMessageHandler.cs index bdfb56601..91998edba 100644 --- a/bff/performance/Bff.Performance/TestInfra/CloningHttpMessageHandler.cs +++ b/bff/performance/Bff.Performance/TestInfra/CloningHttpMessageHandler.cs @@ -9,7 +9,7 @@ public class CloningHttpMessageHandler(HttpClient innerHttpClient) : HttpMessage innerHttpClient ?? throw new ArgumentNullException(nameof(innerHttpClient)); protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { // Clone the incoming request var clonedRequest = await CloneHttpRequestMessageAsync(request); diff --git a/bff/performance/Bff.Performance/TestInfra/RequestLoggingHandler.cs b/bff/performance/Bff.Performance/TestInfra/RequestLoggingHandler.cs index fc3abae9e..81d9102ae 100644 --- a/bff/performance/Bff.Performance/TestInfra/RequestLoggingHandler.cs +++ b/bff/performance/Bff.Performance/TestInfra/RequestLoggingHandler.cs @@ -12,7 +12,7 @@ public class RequestLoggingHandler( : DelegatingHandler { protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { if (!shouldLog(request)) { diff --git a/bff/src/Bff.Blazor.Client/Internals/AntiforgeryHandler.cs b/bff/src/Bff.Blazor.Client/Internals/AntiforgeryHandler.cs index 6d6d05b9d..98ef58f0c 100644 --- a/bff/src/Bff.Blazor.Client/Internals/AntiforgeryHandler.cs +++ b/bff/src/Bff.Blazor.Client/Internals/AntiforgeryHandler.cs @@ -6,7 +6,7 @@ namespace Duende.Bff.Blazor.Client.Internals; internal class AntiForgeryHandler : DelegatingHandler { protected override Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { request.Headers.Add("X-CSRF", "1"); return base.SendAsync(request, ct); diff --git a/bff/src/Bff.Blazor/BffServerAuthenticationStateProvider.cs b/bff/src/Bff.Blazor/BffServerAuthenticationStateProvider.cs index a3084be75..c5a22d567 100644 --- a/bff/src/Bff.Blazor/BffServerAuthenticationStateProvider.cs +++ b/bff/src/Bff.Blazor/BffServerAuthenticationStateProvider.cs @@ -126,7 +126,7 @@ internal sealed class BffServerAuthenticationStateProvider : RevalidatingServerA /// The current authentication state. /// A token that can be used to request cancellation of the asynchronous operation. /// A boolean indicating whether the authentication state is valid. - protected override async Task ValidateAuthenticationStateAsync(AuthenticationState authenticationState, CT ct) + protected override async Task ValidateAuthenticationStateAsync(AuthenticationState authenticationState, Ct ct) { using var scope = _serviceScopeFactory.CreateScope(); var sessionStore = scope.ServiceProvider.GetRequiredService(); diff --git a/bff/src/Bff.Blazor/ServerSideTokenStore.cs b/bff/src/Bff.Blazor/ServerSideTokenStore.cs index 34cf00413..172331fbc 100644 --- a/bff/src/Bff.Blazor/ServerSideTokenStore.cs +++ b/bff/src/Bff.Blazor/ServerSideTokenStore.cs @@ -32,7 +32,7 @@ internal class ServerSideTokenStore( ?? throw new ArgumentException("AuthenticationStateProvider must implement IHostEnvironmentAuthenticationStateProvider"); public async Task> GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters? parameters = null, - CT ct = default) + Ct ct = default) { logger.RetrievingTokenForUser(LogLevel.Debug, user.Identity?.Name); var session = await GetSession(user); @@ -83,7 +83,7 @@ internal class ServerSideTokenStore( } public async Task StoreTokenAsync(ClaimsPrincipal user, UserToken token, - UserTokenRequestParameters? parameters = null, CT ct = default) + UserTokenRequestParameters? parameters = null, Ct ct = default) { logger.StoringTokenForUser(LogLevel.Debug, user.Identity?.Name); await UpdateTicket(user, @@ -91,7 +91,7 @@ internal class ServerSideTokenStore( } - public async Task ClearTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters? parameters = null, CT ct = default) + public async Task ClearTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters? parameters = null, Ct ct = default) { logger.RemovingTokenForUser(LogLevel.Debug, user.Identity?.Name); await UpdateTicket(user, ticket => diff --git a/bff/src/Bff.EntityFramework/ISessionDbContext.cs b/bff/src/Bff.EntityFramework/ISessionDbContext.cs index 8adf7956d..75c552952 100644 --- a/bff/src/Bff.EntityFramework/ISessionDbContext.cs +++ b/bff/src/Bff.EntityFramework/ISessionDbContext.cs @@ -23,5 +23,5 @@ public interface ISessionDbContext /// Saves the changes. /// /// - Task SaveChangesAsync(CT ct = default); + Task SaveChangesAsync(Ct ct = default); } diff --git a/bff/src/Bff.EntityFramework/Internal/UserSessionStore.cs b/bff/src/Bff.EntityFramework/Internal/UserSessionStore.cs index 5bdcda9ff..831e00983 100644 --- a/bff/src/Bff.EntityFramework/Internal/UserSessionStore.cs +++ b/bff/src/Bff.EntityFramework/Internal/UserSessionStore.cs @@ -18,7 +18,7 @@ internal sealed class UserSessionStore( : IUserSessionStore, IUserSessionStoreCleanup { /// - public async Task CreateUserSessionAsync(UserSession session, CT ct) + public async Task CreateUserSessionAsync(UserSession session, Ct ct) { if (!session.PartitionKey.HasValue) { @@ -67,7 +67,7 @@ internal sealed class UserSessionStore( } /// - public async Task DeleteUserSessionAsync(UserSessionKey key, CT ct) + public async Task DeleteUserSessionAsync(UserSessionKey key, Ct ct) { var userKey = key.UserKey; var partitionKey = key.PartitionKey; @@ -104,7 +104,7 @@ internal sealed class UserSessionStore( } /// - public async Task DeleteUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, CT ct) + public async Task DeleteUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, Ct ct) { filter.Validate(); var query = sessionDbContext.UserSessions.Where(x => x.PartitionKey == partitionKey).AsQueryable(); @@ -152,7 +152,7 @@ internal sealed class UserSessionStore( } /// - public async Task GetUserSessionAsync(UserSessionKey key, CT ct) + public async Task GetUserSessionAsync(UserSessionKey key, Ct ct) { var userKey = key.UserKey; var partitionKey = key.PartitionKey; @@ -175,7 +175,7 @@ internal sealed class UserSessionStore( } /// - public async Task> GetUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, CT ct) + public async Task> GetUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, Ct ct) { filter.Validate(); var query = sessionDbContext.UserSessions.Where(x => x.PartitionKey == partitionKey).AsQueryable(); @@ -213,7 +213,7 @@ internal sealed class UserSessionStore( } /// - public async Task UpdateUserSessionAsync(UserSessionKey key, UserSessionUpdate session, CT ct) + public async Task UpdateUserSessionAsync(UserSessionKey key, UserSessionUpdate session, Ct ct) { var userKey = key.UserKey; var partitionKey = key.PartitionKey; @@ -235,7 +235,7 @@ internal sealed class UserSessionStore( } /// - public async Task DeleteExpiredSessionsAsync(CT ct = default) + public async Task DeleteExpiredSessionsAsync(Ct ct = default) { var removed = 0; diff --git a/bff/src/Bff.Yarp/Internal/RemoteRouteHandler.cs b/bff/src/Bff.Yarp/Internal/RemoteRouteHandler.cs index 492ccd4c1..d8f6ab937 100644 --- a/bff/src/Bff.Yarp/Internal/RemoteRouteHandler.cs +++ b/bff/src/Bff.Yarp/Internal/RemoteRouteHandler.cs @@ -68,7 +68,7 @@ internal class RemoteRouteHandler : IDisposable public void ClearTransformerCacheFor(BffFrontend frontend) => _cache.TryRemove(frontend.Name, out _); - public async Task HandleAsync(HttpContext context, CT ct) + public async Task HandleAsync(HttpContext context, Ct ct) { if (!_currentFrontendAccessor.TryGet(out var frontend)) { diff --git a/bff/src/Bff/AccessTokenManagement/IAccessTokenRetriever.cs b/bff/src/Bff/AccessTokenManagement/IAccessTokenRetriever.cs index 9127a0d56..f70128fea 100644 --- a/bff/src/Bff/AccessTokenManagement/IAccessTokenRetriever.cs +++ b/bff/src/Bff/AccessTokenManagement/IAccessTokenRetriever.cs @@ -15,5 +15,5 @@ public interface IAccessTokenRetriever /// A task that contains the access token result, which is an /// object model that can represent various types of tokens (bearer, dpop), /// the absence of an optional token, or an error. - public Task GetAccessTokenAsync(AccessTokenRetrievalContext context, CT ct = default); + public Task GetAccessTokenAsync(AccessTokenRetrievalContext context, Ct ct = default); } diff --git a/bff/src/Bff/Diagnostics/DiagnosticDataService.cs b/bff/src/Bff/Diagnostics/DiagnosticDataService.cs index bb804ac37..e67237821 100644 --- a/bff/src/Bff/Diagnostics/DiagnosticDataService.cs +++ b/bff/src/Bff/Diagnostics/DiagnosticDataService.cs @@ -8,7 +8,7 @@ namespace Duende.Bff.Diagnostics; internal class DiagnosticDataService(DateTime serverStartTime, IEnumerable entries) { - public async Task> GetJsonBytesAsync(CT ct = default) + public async Task> GetJsonBytesAsync(Ct ct = default) { var bufferWriter = new ArrayBufferWriter(); await using var writer = new Utf8JsonWriter(bufferWriter, new JsonWriterOptions { Indented = false }); diff --git a/bff/src/Bff/Diagnostics/DiagnosticHostedService.cs b/bff/src/Bff/Diagnostics/DiagnosticHostedService.cs index f6fa0775d..d2be6eb35 100644 --- a/bff/src/Bff/Diagnostics/DiagnosticHostedService.cs +++ b/bff/src/Bff/Diagnostics/DiagnosticHostedService.cs @@ -14,7 +14,7 @@ internal class DiagnosticHostedService( ILogger logger, TimeProvider timeProvider) : BackgroundService { - protected override async Task ExecuteAsync(CT stoppingToken) + protected override async Task ExecuteAsync(Ct stoppingToken) { using var timer = new PeriodicTimer(options.Value.Diagnostics.LogFrequency, timeProvider); try @@ -40,7 +40,7 @@ internal class DiagnosticHostedService( } } - public override async Task StopAsync(CT ct) + public override async Task StopAsync(Ct ct) { await diagnosticsSummary.PrintSummaryAsync(ct); diff --git a/bff/src/Bff/Diagnostics/DiagnosticSummary.cs b/bff/src/Bff/Diagnostics/DiagnosticSummary.cs index a93dce9bb..a320f0d56 100644 --- a/bff/src/Bff/Diagnostics/DiagnosticSummary.cs +++ b/bff/src/Bff/Diagnostics/DiagnosticSummary.cs @@ -15,7 +15,7 @@ internal class DiagnosticSummary( { private readonly ILogger _logger = loggerFactory.CreateLogger("Duende.BFF.Diagnostics.Summary"); - public async Task PrintSummaryAsync(CT ct = default) + public async Task PrintSummaryAsync(Ct ct = default) { var bffOptions = options.Value; var jsonMemory = await diagnosticDataService.GetJsonBytesAsync(ct); diff --git a/bff/src/Bff/DynamicFrontends/IIndexHtmlTransformer.cs b/bff/src/Bff/DynamicFrontends/IIndexHtmlTransformer.cs index bae1cb126..67ab4fd12 100644 --- a/bff/src/Bff/DynamicFrontends/IIndexHtmlTransformer.cs +++ b/bff/src/Bff/DynamicFrontends/IIndexHtmlTransformer.cs @@ -10,5 +10,5 @@ namespace Duende.Bff.DynamicFrontends; /// public interface IIndexHtmlTransformer { - Task Transform(string indexHtml, BffFrontend frontend, CT ct = default); + Task Transform(string indexHtml, BffFrontend frontend, Ct ct = default); } diff --git a/bff/src/Bff/DynamicFrontends/IStaticFilesClient.cs b/bff/src/Bff/DynamicFrontends/IStaticFilesClient.cs index 3a4dedc36..d9b1bb102 100644 --- a/bff/src/Bff/DynamicFrontends/IStaticFilesClient.cs +++ b/bff/src/Bff/DynamicFrontends/IStaticFilesClient.cs @@ -20,7 +20,7 @@ public interface IStaticFilesClient /// /// CancellationToken /// Index HTML - Task GetIndexHtmlAsync(CT ct = default); + Task GetIndexHtmlAsync(Ct ct = default); /// /// This method proxies all static asset requests to the configured CDN URL for the current frontend. @@ -34,5 +34,5 @@ public interface IStaticFilesClient /// HttpContext /// CancellationToken /// - Task ProxyStaticAssetsAsync(HttpContext context, CT ct = default); + Task ProxyStaticAssetsAsync(HttpContext context, Ct ct = default); } diff --git a/bff/src/Bff/DynamicFrontends/Internal/BffCacheClearingHostedService.cs b/bff/src/Bff/DynamicFrontends/Internal/BffCacheClearingHostedService.cs index a6e4d3cc1..bac8ecae1 100644 --- a/bff/src/Bff/DynamicFrontends/Internal/BffCacheClearingHostedService.cs +++ b/bff/src/Bff/DynamicFrontends/Internal/BffCacheClearingHostedService.cs @@ -30,7 +30,7 @@ internal class BffCacheClearingHostedService( private ChannelWriter Writer => _channel.Writer; private ChannelReader Reader => _channel.Reader; - protected override async Task ExecuteAsync(CT ct) + protected override async Task ExecuteAsync(Ct ct) { // Subscribe to frontend changes and publish messages to the channel frontendCollection.OnFrontendChanged += changedFrontend => @@ -55,7 +55,7 @@ internal class BffCacheClearingHostedService( await ProcessFrontendChangesAsync(ct); } - private async Task ProcessFrontendChangesAsync(CT ct) + private async Task ProcessFrontendChangesAsync(Ct ct) { try { @@ -77,7 +77,7 @@ internal class BffCacheClearingHostedService( } } - private async Task ProcessFrontendChangeAsync(BffFrontend changedFrontend, CT ct) + private async Task ProcessFrontendChangeAsync(BffFrontend changedFrontend, Ct ct) { try { diff --git a/bff/src/Bff/DynamicFrontends/Internal/StaticFilesHttpClient.cs b/bff/src/Bff/DynamicFrontends/Internal/StaticFilesHttpClient.cs index 79f5b6c5f..0f27230c2 100644 --- a/bff/src/Bff/DynamicFrontends/Internal/StaticFilesHttpClient.cs +++ b/bff/src/Bff/DynamicFrontends/Internal/StaticFilesHttpClient.cs @@ -23,7 +23,7 @@ internal class StaticFilesHttpClient( { private readonly CancellationTokenSource _stopping = new(); - public async Task GetIndexHtmlAsync(CT ct = default) + public async Task GetIndexHtmlAsync(Ct ct = default) { var frontend = currentFrontendAccessor.Get(); @@ -67,7 +67,7 @@ internal class StaticFilesHttpClient( } } - public async Task ProxyStaticAssetsAsync(HttpContext context, CT ct = default) + public async Task ProxyStaticAssetsAsync(HttpContext context, Ct ct = default) { var frontend = currentFrontendAccessor.Get(); diff --git a/bff/src/Bff/Endpoints/IBffEndpoint.cs b/bff/src/Bff/Endpoints/IBffEndpoint.cs index 5a0cdf4b2..4b42bfaa8 100644 --- a/bff/src/Bff/Endpoints/IBffEndpoint.cs +++ b/bff/src/Bff/Endpoints/IBffEndpoint.cs @@ -14,5 +14,5 @@ public interface IBffEndpoint /// Process a request /// /// - Task ProcessRequestAsync(HttpContext context, CT ct = default); + Task ProcessRequestAsync(HttpContext context, Ct ct = default); } diff --git a/bff/src/Bff/Endpoints/IUserEndpointClaimsEnricher.cs b/bff/src/Bff/Endpoints/IUserEndpointClaimsEnricher.cs index 8c5681980..7f81dc4e7 100644 --- a/bff/src/Bff/Endpoints/IUserEndpointClaimsEnricher.cs +++ b/bff/src/Bff/Endpoints/IUserEndpointClaimsEnricher.cs @@ -26,5 +26,5 @@ public interface IUserEndpointClaimsEnricher /// The current set of claims to be returned. /// Cancellation token /// The updated list of claims. - Task> EnrichClaimsAsync(AuthenticateResult authenticateResult, IReadOnlyList claims, CT ct = default); + Task> EnrichClaimsAsync(AuthenticateResult authenticateResult, IReadOnlyList claims, Ct ct = default); } diff --git a/bff/src/Bff/Endpoints/Internal/DefaultBackchannelLogoutEndpoint.cs b/bff/src/Bff/Endpoints/Internal/DefaultBackchannelLogoutEndpoint.cs index 56447292b..f53a7441a 100644 --- a/bff/src/Bff/Endpoints/Internal/DefaultBackchannelLogoutEndpoint.cs +++ b/bff/src/Bff/Endpoints/Internal/DefaultBackchannelLogoutEndpoint.cs @@ -27,7 +27,7 @@ internal class DefaultBackchannelLogoutEndpoint( ILogger logger) : IBackchannelLogoutEndpoint { /// - public async Task ProcessRequestAsync(HttpContext context, CT ct = default) + public async Task ProcessRequestAsync(HttpContext context, Ct ct = default) { logger.ProcessingBackChannelLogoutRequest(LogLevel.Debug); @@ -167,7 +167,7 @@ internal class DefaultBackchannelLogoutEndpoint( var config = options.Configuration; if (config == null) { - config = await options.ConfigurationManager?.GetConfigurationAsync(CT.None)!; + config = await options.ConfigurationManager?.GetConfigurationAsync(Ct.None)!; } if (config == null) diff --git a/bff/src/Bff/Endpoints/Internal/DefaultDiagnosticsEndpoint.cs b/bff/src/Bff/Endpoints/Internal/DefaultDiagnosticsEndpoint.cs index 04c8e7402..513a78b07 100644 --- a/bff/src/Bff/Endpoints/Internal/DefaultDiagnosticsEndpoint.cs +++ b/bff/src/Bff/Endpoints/Internal/DefaultDiagnosticsEndpoint.cs @@ -24,7 +24,7 @@ internal class DefaultDiagnosticsEndpoint(IWebHostEnvironment environment, IOpti }; /// - public async Task ProcessRequestAsync(HttpContext context, CT ct = default) + public async Task ProcessRequestAsync(HttpContext context, Ct ct = default) { if (options.Value.DiagnosticsEnvironments?.Contains(environment.EnvironmentName) is null or false) { diff --git a/bff/src/Bff/Endpoints/Internal/DefaultLoginEndpoint.cs b/bff/src/Bff/Endpoints/Internal/DefaultLoginEndpoint.cs index 07b6794b5..3d5b5d5db 100644 --- a/bff/src/Bff/Endpoints/Internal/DefaultLoginEndpoint.cs +++ b/bff/src/Bff/Endpoints/Internal/DefaultLoginEndpoint.cs @@ -27,7 +27,7 @@ internal class DefaultLoginEndpoint( : ILoginEndpoint { /// - public async Task ProcessRequestAsync(HttpContext context, CT ct = default) + public async Task ProcessRequestAsync(HttpContext context, Ct ct = default) { logger.ProcessingLoginRequest(LogLevel.Debug); @@ -85,7 +85,7 @@ internal class DefaultLoginEndpoint( await context.ChallengeAsync(props); } - private async Task?> GetPromptValuesAsync(CT ct = default) + private async Task?> GetPromptValuesAsync(Ct ct = default) { Scheme scheme; diff --git a/bff/src/Bff/Endpoints/Internal/DefaultLogoutEndpoint.cs b/bff/src/Bff/Endpoints/Internal/DefaultLogoutEndpoint.cs index 05a2496af..2991909a4 100644 --- a/bff/src/Bff/Endpoints/Internal/DefaultLogoutEndpoint.cs +++ b/bff/src/Bff/Endpoints/Internal/DefaultLogoutEndpoint.cs @@ -22,7 +22,7 @@ internal class DefaultLogoutEndpoint(IOptions options, : ILogoutEndpoint { /// - public async Task ProcessRequestAsync(HttpContext context, CT ct = default) + public async Task ProcessRequestAsync(HttpContext context, Ct ct = default) { logger.ProcessingLogoutRequest(LogLevel.Debug); diff --git a/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginCallbackEndpoint.cs b/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginCallbackEndpoint.cs index c9cee60d6..9779d72ff 100644 --- a/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginCallbackEndpoint.cs +++ b/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginCallbackEndpoint.cs @@ -21,7 +21,7 @@ internal class DefaultSilentLoginCallbackEndpoint( { /// - public async Task ProcessRequestAsync(HttpContext context, CT ct = default) + public async Task ProcessRequestAsync(HttpContext context, Ct ct = default) { logger.ProcessingSilentLoginCallbackRequest(LogLevel.Debug); diff --git a/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginEndpoint.cs b/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginEndpoint.cs index e231b690d..57b44a75a 100644 --- a/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginEndpoint.cs +++ b/bff/src/Bff/Endpoints/Internal/DefaultSilentLoginEndpoint.cs @@ -23,7 +23,7 @@ internal class DefaultSilentLoginEndpoint(IOptions options, ILogger< private readonly BffOptions _options = options.Value; /// - public async Task ProcessRequestAsync(HttpContext context, CT ct = default) + public async Task ProcessRequestAsync(HttpContext context, Ct ct = default) { logger.ProcessingSilentLoginRequest(LogLevel.Debug); diff --git a/bff/src/Bff/Endpoints/Internal/DefaultUserEndpoint.cs b/bff/src/Bff/Endpoints/Internal/DefaultUserEndpoint.cs index 27c934bbf..3f8387995 100644 --- a/bff/src/Bff/Endpoints/Internal/DefaultUserEndpoint.cs +++ b/bff/src/Bff/Endpoints/Internal/DefaultUserEndpoint.cs @@ -26,7 +26,7 @@ internal class DefaultUserEndpoint(IOptions options, ILogger - public async Task ProcessRequestAsync(HttpContext context, CT ct = default) + public async Task ProcessRequestAsync(HttpContext context, Ct ct = default) { logger.ProcessingUserRequest(LogLevel.Debug); @@ -76,7 +76,7 @@ internal class DefaultUserEndpoint(IOptions options, ILogger /// - private static Task> GetUserClaimsAsync(AuthenticateResult authenticateResult, CT ct = default) => + private static Task> GetUserClaimsAsync(AuthenticateResult authenticateResult, Ct ct = default) => Task.FromResult(authenticateResult.Principal?.Claims.Select(x => new ClaimRecord(x.Type, x.Value)) ?? Enumerable.Empty()); /// @@ -86,7 +86,7 @@ internal class DefaultUserEndpoint(IOptions options, ILogger> GetManagementClaimsAsync( HttpContext context, AuthenticateResult authenticateResult, - CT ct = default) + Ct ct = default) { var claims = new List(); diff --git a/bff/src/Bff/HttpContextExtensions.cs b/bff/src/Bff/HttpContextExtensions.cs index f2254abac..f995a975c 100644 --- a/bff/src/Bff/HttpContextExtensions.cs +++ b/bff/src/Bff/HttpContextExtensions.cs @@ -51,7 +51,7 @@ internal static class HttpContextExtensions this HttpContext context, RequiredTokenType requiredTokenType, BffUserAccessTokenParameters? userAccessTokenParameters = null, - CT ct = default) + Ct ct = default) { if (requiredTokenType == RequiredTokenType.None) { diff --git a/bff/src/Bff/Internal/DefaultAccessTokenRetriever.cs b/bff/src/Bff/Internal/DefaultAccessTokenRetriever.cs index 8da2852b5..db4c900d3 100644 --- a/bff/src/Bff/Internal/DefaultAccessTokenRetriever.cs +++ b/bff/src/Bff/Internal/DefaultAccessTokenRetriever.cs @@ -12,7 +12,7 @@ namespace Duende.Bff.Internal; internal class DefaultAccessTokenRetriever() : IAccessTokenRetriever { /// - public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, CT ct = default) + public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, Ct ct = default) { if (context.Metadata.TokenType.HasValue) { diff --git a/bff/src/Bff/SessionManagement/Revocation/ISessionRevocationService.cs b/bff/src/Bff/SessionManagement/Revocation/ISessionRevocationService.cs index d8506663c..2c9a4b917 100644 --- a/bff/src/Bff/SessionManagement/Revocation/ISessionRevocationService.cs +++ b/bff/src/Bff/SessionManagement/Revocation/ISessionRevocationService.cs @@ -17,5 +17,5 @@ public interface ISessionRevocationService /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task RevokeSessionsAsync(UserSessionsFilter filter, CT ct = default); + Task RevokeSessionsAsync(UserSessionsFilter filter, Ct ct = default); } diff --git a/bff/src/Bff/SessionManagement/Revocation/NopSessionRevocationService.cs b/bff/src/Bff/SessionManagement/Revocation/NopSessionRevocationService.cs index 87a632758..53d5d094c 100644 --- a/bff/src/Bff/SessionManagement/Revocation/NopSessionRevocationService.cs +++ b/bff/src/Bff/SessionManagement/Revocation/NopSessionRevocationService.cs @@ -13,7 +13,7 @@ namespace Duende.Bff.SessionManagement.Revocation; internal class NopSessionRevocationService(ILogger logger) : ISessionRevocationService { /// - public Task RevokeSessionsAsync(UserSessionsFilter filter, CT ct = default) + public Task RevokeSessionsAsync(UserSessionsFilter filter, Ct ct = default) { logger.NopSessionRevocation(LogLevel.Debug, filter.SubjectId, filter.SessionId); return Task.CompletedTask; diff --git a/bff/src/Bff/SessionManagement/Revocation/SessionRevocationService.cs b/bff/src/Bff/SessionManagement/Revocation/SessionRevocationService.cs index 2ba398864..ddca3b7e3 100644 --- a/bff/src/Bff/SessionManagement/Revocation/SessionRevocationService.cs +++ b/bff/src/Bff/SessionManagement/Revocation/SessionRevocationService.cs @@ -27,7 +27,7 @@ internal class SessionRevocationService( private readonly BffOptions _options = options.Value; /// - public async Task RevokeSessionsAsync(UserSessionsFilter filter, CT ct = default) + public async Task RevokeSessionsAsync(UserSessionsFilter filter, Ct ct = default) { if (_options.BackchannelLogoutAllUserSessions) { diff --git a/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStore.cs b/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStore.cs index 115f5806e..5436894d8 100644 --- a/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStore.cs +++ b/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStore.cs @@ -15,7 +15,7 @@ public interface IUserSessionStore /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task GetUserSessionAsync(UserSessionKey key, CT ct = default); + Task GetUserSessionAsync(UserSessionKey key, Ct ct = default); /// /// Creates a user session @@ -23,7 +23,7 @@ public interface IUserSessionStore /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task CreateUserSessionAsync(UserSession session, CT ct = default); + Task CreateUserSessionAsync(UserSession session, Ct ct = default); /// /// Updates a user session @@ -32,7 +32,7 @@ public interface IUserSessionStore /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task UpdateUserSessionAsync(UserSessionKey key, UserSessionUpdate session, CT ct = default); + Task UpdateUserSessionAsync(UserSessionKey key, UserSessionUpdate session, Ct ct = default); /// /// Deletes a user session @@ -40,7 +40,7 @@ public interface IUserSessionStore /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task DeleteUserSessionAsync(UserSessionKey key, CT ct = default); + Task DeleteUserSessionAsync(UserSessionKey key, Ct ct = default); /// /// Queries user sessions based on the filter. @@ -49,7 +49,7 @@ public interface IUserSessionStore /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task> GetUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, CT ct = default); + Task> GetUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, Ct ct = default); /// /// Deletes user sessions based on the filter. @@ -58,5 +58,5 @@ public interface IUserSessionStore /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task DeleteUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, CT ct = default); + Task DeleteUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, Ct ct = default); } diff --git a/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStoreCleanup.cs b/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStoreCleanup.cs index 1a3968292..c802f8436 100644 --- a/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStoreCleanup.cs +++ b/bff/src/Bff/SessionManagement/SessionStore/IUserSessionStoreCleanup.cs @@ -12,5 +12,5 @@ public interface IUserSessionStoreCleanup /// /// Deletes expired sessions /// - Task DeleteExpiredSessionsAsync(CT ct = default); + Task DeleteExpiredSessionsAsync(Ct ct = default); } diff --git a/bff/src/Bff/SessionManagement/SessionStore/InMemoryUserSessionStore.cs b/bff/src/Bff/SessionManagement/SessionStore/InMemoryUserSessionStore.cs index 995f95ac0..f02d0f91b 100644 --- a/bff/src/Bff/SessionManagement/SessionStore/InMemoryUserSessionStore.cs +++ b/bff/src/Bff/SessionManagement/SessionStore/InMemoryUserSessionStore.cs @@ -19,7 +19,7 @@ internal class InMemoryUserSessionStore( // A dictionary of dictionaries, where the outer dictionary is keyed by partition key private readonly ConcurrentDictionary _store = new(); - public Task CreateUserSessionAsync(UserSession session, CT ct = default) + public Task CreateUserSessionAsync(UserSession session, Ct ct = default) { if (!session.PartitionKey.HasValue) { @@ -47,7 +47,7 @@ internal class InMemoryUserSessionStore( return partition; } - public Task GetUserSessionAsync(UserSessionKey key, CT ct = default) + public Task GetUserSessionAsync(UserSessionKey key, Ct ct = default) { var partition = GetPartition(key.PartitionKey); partition.TryGetValue(key.UserKey, out var item); @@ -55,7 +55,7 @@ internal class InMemoryUserSessionStore( return Task.FromResult(item?.Clone()); } - public Task UpdateUserSessionAsync(UserSessionKey key, UserSessionUpdate session, CT ct = default) + public Task UpdateUserSessionAsync(UserSessionKey key, UserSessionUpdate session, Ct ct = default) { var partition = GetPartition(key.PartitionKey); if (!partition.TryGetValue(key.UserKey, out var existing)) @@ -70,14 +70,14 @@ internal class InMemoryUserSessionStore( return Task.CompletedTask; } - public Task DeleteUserSessionAsync(UserSessionKey key, CT ct = default) + public Task DeleteUserSessionAsync(UserSessionKey key, Ct ct = default) { var partition = GetPartition(key.PartitionKey); partition.TryRemove(key.UserKey, out _); return Task.CompletedTask; } - public Task> GetUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, CT ct = default) + public Task> GetUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, Ct ct = default) { filter.Validate(); var partition = GetPartition(partitionKey); @@ -97,7 +97,7 @@ internal class InMemoryUserSessionStore( return Task.FromResult((IReadOnlyCollection)results); } - public Task DeleteUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, CT ct = default) + public Task DeleteUserSessionsAsync(PartitionKey partitionKey, UserSessionsFilter filter, Ct ct = default) { filter.Validate(); var partition = GetPartition(partitionKey); diff --git a/bff/src/Bff/SessionManagement/SessionStore/SessionCleanupHost.cs b/bff/src/Bff/SessionManagement/SessionStore/SessionCleanupHost.cs index ff113b321..abacbd09c 100644 --- a/bff/src/Bff/SessionManagement/SessionStore/SessionCleanupHost.cs +++ b/bff/src/Bff/SessionManagement/SessionStore/SessionCleanupHost.cs @@ -23,7 +23,7 @@ internal class SessionCleanupHost( private TimeSpan CleanupInterval => _options.SessionCleanupInterval; - public override Task StartAsync(CT ct) + public override Task StartAsync(Ct ct) { if (!IsIUserSessionStoreCleanupRegistered()) { @@ -34,7 +34,7 @@ internal class SessionCleanupHost( return base.StartAsync(ct); } - protected override async Task ExecuteAsync(CT ct) + protected override async Task ExecuteAsync(Ct ct) { while (true) { @@ -70,7 +70,7 @@ internal class SessionCleanupHost( } } - internal async Task RunAsync(CT ct = default) + internal async Task RunAsync(Ct ct = default) { try { diff --git a/bff/src/Bff/SessionManagement/TicketStore/IServerTicketStore.cs b/bff/src/Bff/SessionManagement/TicketStore/IServerTicketStore.cs index ee4e1e3c3..a1dc53f1d 100644 --- a/bff/src/Bff/SessionManagement/TicketStore/IServerTicketStore.cs +++ b/bff/src/Bff/SessionManagement/TicketStore/IServerTicketStore.cs @@ -18,5 +18,5 @@ public interface IServerTicketStore : ITicketStore /// /// A token that can be used to request cancellation of the asynchronous operation. /// - Task> GetUserTicketsAsync(UserSessionsFilter filter, CT ct = default); + Task> GetUserTicketsAsync(UserSessionsFilter filter, Ct ct = default); } diff --git a/bff/src/Bff/SessionManagement/TicketStore/ServerSideTicketStore.cs b/bff/src/Bff/SessionManagement/TicketStore/ServerSideTicketStore.cs index 93a0ea875..e49fa97ca 100644 --- a/bff/src/Bff/SessionManagement/TicketStore/ServerSideTicketStore.cs +++ b/bff/src/Bff/SessionManagement/TicketStore/ServerSideTicketStore.cs @@ -31,7 +31,7 @@ internal class ServerSideTicketStore( private readonly IDataProtector _protector = dataProtectionProvider.CreateProtector(DataProtectorPurpose); - private CT _ct => accessor.HttpContext?.RequestAborted ?? CT.None; + private Ct _ct => accessor.HttpContext?.RequestAborted ?? Ct.None; /// public async Task StoreAsync(AuthenticationTicket ticket) @@ -154,7 +154,7 @@ internal class ServerSideTicketStore( } /// - public async Task> GetUserTicketsAsync(UserSessionsFilter filter, CT ct) + public async Task> GetUserTicketsAsync(UserSessionsFilter filter, Ct ct) { logger.GettingAuthenticationTickets(LogLevel.Debug, filter.SubjectId, filter.SessionId); diff --git a/bff/test/Bff.Tests/BffFrontendIndexTests.cs b/bff/test/Bff.Tests/BffFrontendIndexTests.cs index 63b122525..b90097a52 100644 --- a/bff/test/Bff.Tests/BffFrontendIndexTests.cs +++ b/bff/test/Bff.Tests/BffFrontendIndexTests.cs @@ -171,7 +171,7 @@ public class BffFrontendIndexTests : BffTestBase { private int count = 1; - public Task Transform(string html, BffFrontend frontend, CT ct = default) => Task.FromResult($"{html} - transformed {count++}"); + public Task Transform(string html, BffFrontend frontend, Ct ct = default) => Task.FromResult($"{html} - transformed {count++}"); } [Fact] diff --git a/bff/test/Bff.Tests/BffFrontendSigninTests.cs b/bff/test/Bff.Tests/BffFrontendSigninTests.cs index 918be7852..50c99a202 100644 --- a/bff/test/Bff.Tests/BffFrontendSigninTests.cs +++ b/bff/test/Bff.Tests/BffFrontendSigninTests.cs @@ -60,7 +60,7 @@ public class BffFrontendSigninTests : BffTestBase Bff.OnConfigureApp += app => { - app.MapGet(pathString, (HttpContext c, CT ct) => "ok"); + app.MapGet(pathString, (HttpContext c, Ct ct) => "ok"); }; await InitializeAsync(); diff --git a/bff/test/Bff.Tests/BffRemoteApiTests.cs b/bff/test/Bff.Tests/BffRemoteApiTests.cs index f0182ab81..d5b7ee867 100644 --- a/bff/test/Bff.Tests/BffRemoteApiTests.cs +++ b/bff/test/Bff.Tests/BffRemoteApiTests.cs @@ -143,7 +143,7 @@ public class BffRemoteApiTests : BffTestBase public bool WasCalled = false; public Task> GetAccessTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters? parameters = null, - CT ct = new CT()) + Ct ct = new Ct()) { WasCalled = true; // We don't care actually about the result token. Just if it was called or not. @@ -151,7 +151,7 @@ public class BffRemoteApiTests : BffTestBase } public Task RevokeRefreshTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters? parameters = null, - CT ct = new CT()) => throw new NotImplementedException(); + Ct ct = new Ct()) => throw new NotImplementedException(); } [Fact] diff --git a/bff/test/Bff.Tests/BffScenarioTests.cs b/bff/test/Bff.Tests/BffScenarioTests.cs index 1fdbb346d..c5764b9b7 100644 --- a/bff/test/Bff.Tests/BffScenarioTests.cs +++ b/bff/test/Bff.Tests/BffScenarioTests.cs @@ -47,7 +47,7 @@ public class BffScenarioTests : BffTestBase TaskCompletionSource contentReceived, TaskCompletionSource workerIsAllowedToStart) : BackgroundService { - protected override async Task ExecuteAsync(CT stoppingToken) + protected override async Task ExecuteAsync(Ct stoppingToken) { await workerIsAllowedToStart.Task; diff --git a/bff/test/Bff.Tests/BffWithoutExplicitFrontendTests.cs b/bff/test/Bff.Tests/BffWithoutExplicitFrontendTests.cs index 40f11c29b..18059beaf 100644 --- a/bff/test/Bff.Tests/BffWithoutExplicitFrontendTests.cs +++ b/bff/test/Bff.Tests/BffWithoutExplicitFrontendTests.cs @@ -11,7 +11,7 @@ public class BffWithoutExplicitFrontendTests : BffTestBase { Bff.OnConfigureApp += app => { - app.MapGet("/secret", (HttpContext c, CT ct) => + app.MapGet("/secret", (HttpContext c, Ct ct) => { if (!c.User.IsAuthenticated()) { diff --git a/bff/test/Bff.Tests/Blazor/Client/AntiforgeryHandlerTests.cs b/bff/test/Bff.Tests/Blazor/Client/AntiforgeryHandlerTests.cs index 30a7b2949..1510efc29 100644 --- a/bff/test/Bff.Tests/Blazor/Client/AntiforgeryHandlerTests.cs +++ b/bff/test/Bff.Tests/Blazor/Client/AntiforgeryHandlerTests.cs @@ -23,7 +23,7 @@ public class AntiForgeryHandlerTests var client = new HttpClient(sut); - await client.SendAsync(request, CT.None); + await client.SendAsync(request, Ct.None); request.Headers.ShouldContain(h => h.Key == "X-CSRF" && h.Value.Contains("1")); } @@ -31,5 +31,5 @@ public class AntiForgeryHandlerTests public class NoOpHttpMessageHandler : HttpMessageHandler { - protected override Task SendAsync(HttpRequestMessage request, CT ct) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)); + protected override Task SendAsync(HttpRequestMessage request, Ct ct) => Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)); } diff --git a/bff/test/Bff.Tests/Blazor/Client/FetchUserServiceTests.cs b/bff/test/Bff.Tests/Blazor/Client/FetchUserServiceTests.cs index 8b0b24987..3f31bf19d 100644 --- a/bff/test/Bff.Tests/Blazor/Client/FetchUserServiceTests.cs +++ b/bff/test/Bff.Tests/Blazor/Client/FetchUserServiceTests.cs @@ -60,7 +60,7 @@ public class MockHttpMessageHandler : HttpMessageHandler } protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { if (request.Content != null) // Could be a GET-request without a body { diff --git a/bff/test/Bff.Tests/ConventionTests.cs b/bff/test/Bff.Tests/ConventionTests.cs index 315bddc53..99488431e 100644 --- a/bff/test/Bff.Tests/ConventionTests.cs +++ b/bff/test/Bff.Tests/ConventionTests.cs @@ -211,12 +211,12 @@ public class ConventionTests failures.Add($"{type.FullName}.{method.Name}: Async method should be suffixed with 'Async'."); } - // 2. Last parameter should be a CT (if there are any parameters) + // 2. Last parameter should be a Ct (if there are any parameters) var parameters = method.GetParameters(); - if (parameters.Length == 0 || parameters.Last().ParameterType != typeof(CT)) + if (parameters.Length == 0 || parameters.Last().ParameterType != typeof(Ct)) { failures.Add( - $"{type.FullName}.{method.Name}: Async method should have a CT as the last parameter."); + $"{type.FullName}.{method.Name}: Async method should have a Ct as the last parameter."); } } } @@ -273,7 +273,7 @@ public class ConventionTests } var ctParam = parameters.Last(); - if (ctParam.ParameterType != typeof(CT)) + if (ctParam.ParameterType != typeof(Ct)) { failures.Add($"{type.FullName}.{method.Name}: Last parameter should be CancellationToken."); continue; diff --git a/bff/test/Bff.Tests/Endpoints/Management/UserEndpointTests.cs b/bff/test/Bff.Tests/Endpoints/Management/UserEndpointTests.cs index 684510229..0aa7b554f 100644 --- a/bff/test/Bff.Tests/Endpoints/Management/UserEndpointTests.cs +++ b/bff/test/Bff.Tests/Endpoints/Management/UserEndpointTests.cs @@ -33,7 +33,7 @@ public class UserEndpointTests : BffTestBase private class TestClaimsEnricher(IHttpClientFactory factory) : IUserEndpointClaimsEnricher { - public async Task> EnrichClaimsAsync(AuthenticateResult authenticateResult, IReadOnlyList claims, CT ct = default) + public async Task> EnrichClaimsAsync(AuthenticateResult authenticateResult, IReadOnlyList claims, Ct ct = default) { var client = factory.CreateClient("c1"); diff --git a/bff/test/Bff.Tests/IAccessTokenRetriever_Extensibility_tests.cs b/bff/test/Bff.Tests/IAccessTokenRetriever_Extensibility_tests.cs index cb381ed83..d351ec1c4 100644 --- a/bff/test/Bff.Tests/IAccessTokenRetriever_Extensibility_tests.cs +++ b/bff/test/Bff.Tests/IAccessTokenRetriever_Extensibility_tests.cs @@ -92,7 +92,7 @@ public class IAccessTokenRetriever_Extensibility_tests : BffTestBase { } - public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, CT ct = default) + public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, Ct ct = default) { UsedContext = context; if (context.Metadata.TokenType.HasValue) diff --git a/bff/test/Bff.Tests/SessionManagement/ServerSideTokenStoreTests.cs b/bff/test/Bff.Tests/SessionManagement/ServerSideTokenStoreTests.cs index fd3517d53..23ffff2e4 100644 --- a/bff/test/Bff.Tests/SessionManagement/ServerSideTokenStoreTests.cs +++ b/bff/test/Bff.Tests/SessionManagement/ServerSideTokenStoreTests.cs @@ -117,7 +117,7 @@ public class ServerSideTokenStoreTests public Task SetUserTokenAsync(UserToken token, AuthenticationProperties authenticationProperties, - UserTokenRequestParameters? parameters = null, CT ct = new CT()) + UserTokenRequestParameters? parameters = null, Ct ct = new Ct()) { Stored = token; return Task.CompletedTask; @@ -127,7 +127,7 @@ public class ServerSideTokenStoreTests UserTokenRequestParameters? parameters = null) => Stored = null; public Task GetSchemeAsync(UserTokenRequestParameters? parameters = null, - CT ct = new CT()) => + Ct ct = new Ct()) => Task.FromResult(Scheme.Bearer); } diff --git a/bff/test/Bff.Tests/TestFramework/FailureAccessTokenRetriever.cs b/bff/test/Bff.Tests/TestFramework/FailureAccessTokenRetriever.cs index e4db35e36..11eb626f5 100644 --- a/bff/test/Bff.Tests/TestFramework/FailureAccessTokenRetriever.cs +++ b/bff/test/Bff.Tests/TestFramework/FailureAccessTokenRetriever.cs @@ -7,7 +7,7 @@ namespace Duende.Bff.Tests.TestFramework; public class FailureAccessTokenRetriever : IAccessTokenRetriever { - public Task GetAccessTokenAsync(AccessTokenRetrievalContext context, CT ct = default) => + public Task GetAccessTokenAsync(AccessTokenRetrievalContext context, Ct ct = default) => Task.FromResult(new AccessTokenRetrievalError { Error = "no access token" diff --git a/bff/test/Bff.Tests/TestFramework/MockSessionRevocationService.cs b/bff/test/Bff.Tests/TestFramework/MockSessionRevocationService.cs index 163aa365d..441ded8bc 100644 --- a/bff/test/Bff.Tests/TestFramework/MockSessionRevocationService.cs +++ b/bff/test/Bff.Tests/TestFramework/MockSessionRevocationService.cs @@ -10,7 +10,7 @@ public class MockSessionRevocationService : ISessionRevocationService { public bool DeleteUserSessionsWasCalled { get; set; } public UserSessionsFilter? DeleteUserSessionsFilter { get; set; } - public Task RevokeSessionsAsync(UserSessionsFilter filter, CT ct) + public Task RevokeSessionsAsync(UserSessionsFilter filter, Ct ct) { DeleteUserSessionsWasCalled = true; DeleteUserSessionsFilter = filter; diff --git a/bff/test/Bff.Tests/TestFramework/TestAccessTokenRetriever.cs b/bff/test/Bff.Tests/TestFramework/TestAccessTokenRetriever.cs index 04b4e7cb4..905a57ac5 100644 --- a/bff/test/Bff.Tests/TestFramework/TestAccessTokenRetriever.cs +++ b/bff/test/Bff.Tests/TestFramework/TestAccessTokenRetriever.cs @@ -7,5 +7,5 @@ namespace Duende.Bff.Tests.TestFramework; public class TestAccessTokenRetriever(Func> accessTokenGetter) : IAccessTokenRetriever { - public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, CT ct = default) => await accessTokenGetter(); + public async Task GetAccessTokenAsync(AccessTokenRetrievalContext context, Ct ct = default) => await accessTokenGetter(); } diff --git a/bff/test/Bff.Tests/TestFramework/TestBrowserClient.cs b/bff/test/Bff.Tests/TestFramework/TestBrowserClient.cs index 115d232f5..f4398d6ad 100644 --- a/bff/test/Bff.Tests/TestFramework/TestBrowserClient.cs +++ b/bff/test/Bff.Tests/TestFramework/TestBrowserClient.cs @@ -15,7 +15,7 @@ public class TestBrowserClient : HttpClient public HttpResponseMessage? LastResponse { get; private set; } protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { CurrentUri = request.RequestUri ?? throw new NullReferenceException("RequestUri is not set"); var cookieHeader = CookieContainer.GetCookieHeader(request.RequestUri); @@ -83,7 +83,7 @@ public class TestBrowserClient : HttpClient internal async Task CallBffHostApi( string url, HttpStatusCode? expectedStatusCode = null, - CT ct = default) + Ct ct = default) { var req = new HttpRequestMessage(HttpMethod.Get, url); req.Headers.Add("x-csrf", "1"); @@ -112,7 +112,7 @@ public class TestBrowserClient : HttpClient HttpMethod method, HttpContent? content = null, HttpStatusCode? expectedStatusCode = null, - CT ct = default) + Ct ct = default) { var req = new HttpRequestMessage(method, url); if (req.Content == null) diff --git a/bff/test/Bff.Tests/TestInfra/BffHttpClient.cs b/bff/test/Bff.Tests/TestInfra/BffHttpClient.cs index 6483082d4..eaa33a0c6 100644 --- a/bff/test/Bff.Tests/TestInfra/BffHttpClient.cs +++ b/bff/test/Bff.Tests/TestInfra/BffHttpClient.cs @@ -51,7 +51,7 @@ public class BffHttpClient(RedirectHandler handler, CookieContainer cookies, Ide HttpContent? content = null, HttpStatusCode? expectedStatusCode = null, Dictionary? headers = null, - CT ct = default) => CallBffHostApi( + Ct ct = default) => CallBffHostApi( url: new Uri(path, UriKind.Relative), method: method, content: content, @@ -65,7 +65,7 @@ public class BffHttpClient(RedirectHandler handler, CookieContainer cookies, Ide HttpContent? content = null, HttpStatusCode? expectedStatusCode = null, Dictionary? headers = null, - CT ct = default) + Ct ct = default) { method ??= HttpMethod.Get; var req = new HttpRequestMessage(method, url); diff --git a/bff/test/Bff.Tests/TestInfra/CookieHandler.cs b/bff/test/Bff.Tests/TestInfra/CookieHandler.cs index 94fe8901f..391a9d4b2 100644 --- a/bff/test/Bff.Tests/TestInfra/CookieHandler.cs +++ b/bff/test/Bff.Tests/TestInfra/CookieHandler.cs @@ -9,7 +9,7 @@ namespace Duende.Bff.Tests.TestInfra; public class CookieHandler(HttpMessageHandler innerHandler, CookieContainer cookieContainer) : DelegatingHandler(innerHandler) { - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { var requestUri = request.RequestUri; var header = cookieContainer.GetCookieHeader(requestUri!); diff --git a/bff/test/Bff.Tests/TestInfra/RedirectHandler.cs b/bff/test/Bff.Tests/TestInfra/RedirectHandler.cs index feb390c3e..81207d738 100644 --- a/bff/test/Bff.Tests/TestInfra/RedirectHandler.cs +++ b/bff/test/Bff.Tests/TestInfra/RedirectHandler.cs @@ -12,7 +12,7 @@ public class RedirectHandler(WriteTestOutput output) : DelegatingHandler public bool AutoFollowRedirects { get; set; } = true; protected override async Task SendAsync(HttpRequestMessage request, - CT ct) + Ct ct) { var originalUri = request.RequestUri; diff --git a/bff/test/Bff.Tests/TestInfra/RoutingMessageHandler.cs b/bff/test/Bff.Tests/TestInfra/RoutingMessageHandler.cs index 708ba204a..9d1502f14 100644 --- a/bff/test/Bff.Tests/TestInfra/RoutingMessageHandler.cs +++ b/bff/test/Bff.Tests/TestInfra/RoutingMessageHandler.cs @@ -27,7 +27,7 @@ public class RoutingMessageHandler : HttpMessageHandler protected override Task SendAsync( HttpRequestMessage request, - CT ct) + Ct ct) { var host = $"{request.RequestUri?.Host}:{request.RequestUri?.Port}"; @@ -46,7 +46,7 @@ public class RoutingMessageHandler : HttpMessageHandler { internal Task SuppressedSend( HttpRequestMessage request, - CT ct) + Ct ct) { Task t; if (ExecutionContext.IsFlowSuppressed()) diff --git a/bff/test/Bff.Tests/TestInfra/SimulatedInternet.cs b/bff/test/Bff.Tests/TestInfra/SimulatedInternet.cs index d7aa10cdb..316ba1999 100644 --- a/bff/test/Bff.Tests/TestInfra/SimulatedInternet.cs +++ b/bff/test/Bff.Tests/TestInfra/SimulatedInternet.cs @@ -59,7 +59,7 @@ public class SimulatedInternet : DelegatingHandler protected override async Task SendAsync( HttpRequestMessage request, - CT ct) + Ct ct) { var requestId = Interlocked.Increment(ref _requestIdSeed); diff --git a/bff/test/Bff.Tests/TestInfra/TestHybridCache.cs b/bff/test/Bff.Tests/TestInfra/TestHybridCache.cs index 08a21cfbf..24ec0cd22 100644 --- a/bff/test/Bff.Tests/TestInfra/TestHybridCache.cs +++ b/bff/test/Bff.Tests/TestInfra/TestHybridCache.cs @@ -10,19 +10,19 @@ internal class TestHybridCache : HybridCache { private ConcurrentDictionary> _cache = new(); public override async ValueTask GetOrCreateAsync(string key, TState state, - Func> factory, HybridCacheEntryOptions? options = null, - IEnumerable? tags = null, CT ct = new CT()) => (T)await _cache.GetOrAdd(key, async _ => (await factory(state, ct))!); + Func> factory, HybridCacheEntryOptions? options = null, + IEnumerable? tags = null, Ct ct = new Ct()) => (T)await _cache.GetOrAdd(key, async _ => (await factory(state, ct))!); public override ValueTask SetAsync(string key, T value, HybridCacheEntryOptions? options = null, IEnumerable? tags = null, - CT ct = new CT()) + Ct ct = new Ct()) { _cache[key] = new ValueTask(value!); return ValueTask.CompletedTask; } public override ValueTask - RemoveAsync(string key, CT ct = new CT()) + RemoveAsync(string key, Ct ct = new Ct()) { _waitUntilRemoveAsyncCalled.Set(); _cache.TryRemove(key, out _); @@ -33,7 +33,7 @@ internal class TestHybridCache : HybridCache ManualResetEventSlim _waitUntilRemoveAsyncCalled = new ManualResetEventSlim(); public override ValueTask RemoveByTagAsync(string tag, - CT ct = new CT()) + Ct ct = new Ct()) { _waitUntilRemoveByTagAsyncCalled.Set(); _cache.Clear(); diff --git a/bff/test/Bff.Tests/TestInfra/TestTokenRetriever.cs b/bff/test/Bff.Tests/TestInfra/TestTokenRetriever.cs index 8a7e3eaed..458f50c79 100644 --- a/bff/test/Bff.Tests/TestInfra/TestTokenRetriever.cs +++ b/bff/test/Bff.Tests/TestInfra/TestTokenRetriever.cs @@ -11,7 +11,7 @@ public class TestTokenRetriever : IAccessTokenRetriever public AccessTokenRetrievalContext? UsedContext { get; set; } public Task GetAccessTokenAsync(AccessTokenRetrievalContext context, - CT ct = default) + Ct ct = default) { UsedContext = context; return Task.FromResult(new NoAccessTokenResult()); diff --git a/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpoint.cs b/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpoint.cs index 466de96e9..77e3f6cb8 100644 --- a/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpoint.cs +++ b/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpoint.cs @@ -41,7 +41,7 @@ internal sealed partial class ConformanceReportEndpoint /// /// Processes requests for the HTML conformance report. /// - public async Task GetHtmlReportAsync(HttpContext context, CT ct) + public async Task GetHtmlReportAsync(HttpContext context, Ct ct) { LogProcessingRequest(); diff --git a/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpointExtensions.cs b/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpointExtensions.cs index cc0235f50..c8d586980 100644 --- a/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpointExtensions.cs +++ b/conformance-report/src/ConformanceReport/Endpoints/ConformanceReportEndpointExtensions.cs @@ -25,7 +25,7 @@ public static class ConformanceReportEndpointExtensions var group = endpoints.MapGroup(basePath); // HTML endpoint - requires custom authorization policy - _ = group.MapGet("", async (ConformanceReportEndpoint endpoint, HttpContext context, CT ct) => + _ = group.MapGet("", async (ConformanceReportEndpoint endpoint, HttpContext context, Ct ct) => await endpoint.GetHtmlReportAsync(context, ct)) .RequireAuthorization(options.AuthorizationPolicyName) .WithName("GetConformanceHtmlReport") diff --git a/conformance-report/src/ConformanceReport/IConformanceReportClientStore.cs b/conformance-report/src/ConformanceReport/IConformanceReportClientStore.cs index 5b602b5c0..d369010f8 100644 --- a/conformance-report/src/ConformanceReport/IConformanceReportClientStore.cs +++ b/conformance-report/src/ConformanceReport/IConformanceReportClientStore.cs @@ -5,5 +5,5 @@ namespace Duende.ConformanceReport; internal interface IConformanceReportClientStore { - Task> GetAllClientsAsync(CT ct); + Task> GetAllClientsAsync(Ct ct); } diff --git a/conformance-report/src/ConformanceReport/Services/ConformanceReportAssessmentService.cs b/conformance-report/src/ConformanceReport/Services/ConformanceReportAssessmentService.cs index 20b51f45f..dc4242ac2 100644 --- a/conformance-report/src/ConformanceReport/Services/ConformanceReportAssessmentService.cs +++ b/conformance-report/src/ConformanceReport/Services/ConformanceReportAssessmentService.cs @@ -44,7 +44,7 @@ internal class ConformanceReportAssessmentService /// /// The cancellation token. /// A conformance report containing the assessment results. - public async Task GenerateReportAsync(CT ct) + public async Task GenerateReportAsync(Ct ct) { var clients = await _clientStore.GetAllClientsAsync(ct); var clientList = clients.ToList(); @@ -91,7 +91,7 @@ internal class ConformanceReportAssessmentService /// A profile result containing the assessment findings. public async Task AssessProfileAsync( ConformanceReportProfile profile, - CT ct) + Ct ct) { var clients = await _clientStore.GetAllClientsAsync(ct); var clientList = clients.ToList(); diff --git a/docs-mcp/src/Documentation.Mcp/Sources/Blog/BlogSearchTool.cs b/docs-mcp/src/Documentation.Mcp/Sources/Blog/BlogSearchTool.cs index e4da5a338..cc15bbf9a 100644 --- a/docs-mcp/src/Documentation.Mcp/Sources/Blog/BlogSearchTool.cs +++ b/docs-mcp/src/Documentation.Mcp/Sources/Blog/BlogSearchTool.cs @@ -19,7 +19,7 @@ internal sealed class BlogSearchTool(McpDb db) [Description("The search query. Keep it concise and specific to increase the likelihood of a match.")] string query) { var results = await db.FTSBlogArticle - .FromSqlRaw("SELECT * FROM FTSBlogArticle WHERE Title MATCH {0} OR Content MATCH {0} ORDER BY rank", McpDb.EscapeFtsQueryString(query)) + .FromSqlRaw("SELECt * FROM FTSBlogArticle WHERE Title MATCH {0} OR Content MATCH {0} ORDER BY rank", McpDb.EscapeFtsQueryString(query)) .AsNoTracking() .Take(6) .ToListAsync(); @@ -48,7 +48,7 @@ internal sealed class BlogSearchTool(McpDb db) public async Task Fetch([Description("The document id.")] string id) { var result = await db.FTSBlogArticle - .FromSqlRaw("SELECT * FROM FTSBlogArticle WHERE Id = {0} ORDER BY rank", id) + .FromSqlRaw("SELECt * FROM FTSBlogArticle WHERE Id = {0} ORDER BY rank", id) .AsNoTracking() .FirstOrDefaultAsync(); diff --git a/docs-mcp/src/Documentation.Mcp/Sources/Docs/DocsSearchTool.cs b/docs-mcp/src/Documentation.Mcp/Sources/Docs/DocsSearchTool.cs index 6a7d03bf3..cd2d31291 100644 --- a/docs-mcp/src/Documentation.Mcp/Sources/Docs/DocsSearchTool.cs +++ b/docs-mcp/src/Documentation.Mcp/Sources/Docs/DocsSearchTool.cs @@ -19,7 +19,7 @@ internal sealed class DocsSearchTool(McpDb db) [Description("The search query. Keep it concise and specific to increase the likelihood of a match.")] string query) { var results = await db.FTSDocsArticle - .FromSqlRaw("SELECT * FROM FTSDocsArticle WHERE Title MATCH {0} OR Content MATCH {0} OR Product MATCH {0} ORDER BY rank", McpDb.EscapeFtsQueryString(query)) + .FromSqlRaw("SELECt * FROM FTSDocsArticle WHERE Title MATCH {0} OR Content MATCH {0} OR Product MATCH {0} ORDER BY rank", McpDb.EscapeFtsQueryString(query)) .AsNoTracking() .Take(6) .ToListAsync(); @@ -49,7 +49,7 @@ internal sealed class DocsSearchTool(McpDb db) [Description("The document id.")] string id) { var result = await db.FTSDocsArticle - .FromSqlRaw("SELECT * FROM FTSDocsArticle WHERE Id = {0} ORDER BY rank", id) + .FromSqlRaw("SELECt * FROM FTSDocsArticle WHERE Id = {0} ORDER BY rank", id) .AsNoTracking() .FirstOrDefaultAsync(); diff --git a/docs-mcp/src/Documentation.Mcp/Sources/Samples/SamplesSearchTool.cs b/docs-mcp/src/Documentation.Mcp/Sources/Samples/SamplesSearchTool.cs index 01b583b81..39362aa7c 100644 --- a/docs-mcp/src/Documentation.Mcp/Sources/Samples/SamplesSearchTool.cs +++ b/docs-mcp/src/Documentation.Mcp/Sources/Samples/SamplesSearchTool.cs @@ -19,7 +19,7 @@ internal sealed class SamplesSearchTool(McpDb db) [Description("The search query. Keep it concise and specific to increase the likelihood of a match.")] string query) { var results = await db.FTSSampleProject - .FromSqlRaw("SELECT * FROM FTSSampleProject WHERE Title MATCH {0} OR Description MATCH {0} OR Product MATCH {0} ORDER BY rank", McpDb.EscapeFtsQueryString(query, "OR")) + .FromSqlRaw("SELECt * FROM FTSSampleProject WHERE Title MATCH {0} OR Description MATCH {0} OR Product MATCH {0} ORDER BY rank", McpDb.EscapeFtsQueryString(query, "OR")) .AsNoTracking() .Take(6) .ToListAsync(); @@ -49,7 +49,7 @@ internal sealed class SamplesSearchTool(McpDb db) [Description("The document id.")] string id) { var result = await db.FTSSampleProject - .FromSqlRaw("SELECT * FROM FTSSampleProject WHERE Id = {0} ORDER BY rank", id) + .FromSqlRaw("SELECt * FROM FTSSampleProject WHERE Id = {0} ORDER BY rank", id) .AsNoTracking() .FirstOrDefaultAsync(); @@ -72,7 +72,7 @@ internal sealed class SamplesSearchTool(McpDb db) filename = filename.Replace("wwwroot", "~", StringComparison.Ordinal); var result = await db.FTSSampleProject - .FromSqlRaw("SELECT * FROM FTSSampleProject WHERE Id = {0} ORDER BY rank", id) + .FromSqlRaw("SELECt * FROM FTSSampleProject WHERE Id = {0} ORDER BY rank", id) .AsNoTracking() .FirstOrDefaultAsync(); diff --git a/identity-server/aspire/ServiceDefaults/Extensions.cs b/identity-server/aspire/ServiceDefaults/Extensions.cs index 5c5d31796..b0b3730bf 100644 --- a/identity-server/aspire/ServiceDefaults/Extensions.cs +++ b/identity-server/aspire/ServiceDefaults/Extensions.cs @@ -82,7 +82,7 @@ public static class Extensions } // Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package) - //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"])) + //if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECtION_STRING"])) //{ // builder.Services.AddOpenTelemetry() // .UseAzureMonitor(); diff --git a/identity-server/clients/src/ConsoleCode/SystemBrowser.cs b/identity-server/clients/src/ConsoleCode/SystemBrowser.cs index 3e041c3b2..f636ccbf7 100644 --- a/identity-server/clients/src/ConsoleCode/SystemBrowser.cs +++ b/identity-server/clients/src/ConsoleCode/SystemBrowser.cs @@ -45,7 +45,7 @@ public class SystemBrowser : IBrowser return port; } - public async Task InvokeAsync(BrowserOptions options, CT ct = default) + public async Task InvokeAsync(BrowserOptions options, Ct ct = default) { using (var listener = new LoopbackHttpListener(Port, _path)) { diff --git a/identity-server/clients/src/ConsolePrivateKeyJwtClient/Program.cs b/identity-server/clients/src/ConsolePrivateKeyJwtClient/Program.cs index 4439f5424..c21dae2a7 100644 --- a/identity-server/clients/src/ConsolePrivateKeyJwtClient/Program.cs +++ b/identity-server/clients/src/ConsolePrivateKeyJwtClient/Program.cs @@ -49,7 +49,7 @@ var ecKey = { "kty":"EC", "crv":"P-256", - "x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", + "x":"MKBCtNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", "d":"870MB6gfuTJ4HtUnUvYMyJpr5eUZNP4Bk43bVdj3eAE", "use":"enc", diff --git a/identity-server/clients/src/ConsoleResourceIndicators/SystemBrowser.cs b/identity-server/clients/src/ConsoleResourceIndicators/SystemBrowser.cs index 1effbbfc4..32c0af430 100644 --- a/identity-server/clients/src/ConsoleResourceIndicators/SystemBrowser.cs +++ b/identity-server/clients/src/ConsoleResourceIndicators/SystemBrowser.cs @@ -37,7 +37,7 @@ public class SystemBrowser : IBrowser return port; } - public async Task InvokeAsync(BrowserOptions options, CT ct = default) + public async Task InvokeAsync(BrowserOptions options, Ct ct = default) { using (var listener = new LoopbackHttpListener(Port, _path)) { diff --git a/identity-server/clients/src/MvcDPoP/TestHandler.cs b/identity-server/clients/src/MvcDPoP/TestHandler.cs index cef0d4180..3f10942a9 100644 --- a/identity-server/clients/src/MvcDPoP/TestHandler.cs +++ b/identity-server/clients/src/MvcDPoP/TestHandler.cs @@ -8,7 +8,7 @@ public class TestHandler : DelegatingHandler private readonly ILogger _logger; public TestHandler(ILogger logger) => _logger = logger; - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { var response = await base.SendAsync(request, ct); if (response.Headers.Contains("WWW-Authenticate")) diff --git a/identity-server/clients/src/MvcJarJwt/ClientAssertionService.cs b/identity-server/clients/src/MvcJarJwt/ClientAssertionService.cs index 05bd8331a..273ea9912 100644 --- a/identity-server/clients/src/MvcJarJwt/ClientAssertionService.cs +++ b/identity-server/clients/src/MvcJarJwt/ClientAssertionService.cs @@ -10,7 +10,7 @@ namespace MvcJarJwt; public class ClientAssertionService(AssertionService assertionService) : IClientAssertionService { public Task GetClientAssertionAsync(ClientCredentialsClientName? clientName = null, TokenRequestParameters parameters = null, - CT ct = new()) + Ct ct = new()) { var assertion = new ClientAssertion { diff --git a/identity-server/clients/src/MvcJarUriJwt/ClientAssertionService.cs b/identity-server/clients/src/MvcJarUriJwt/ClientAssertionService.cs index 6ed71961c..587ddc2ef 100644 --- a/identity-server/clients/src/MvcJarUriJwt/ClientAssertionService.cs +++ b/identity-server/clients/src/MvcJarUriJwt/ClientAssertionService.cs @@ -11,7 +11,7 @@ public class ClientAssertionService(AssertionService assertionService) : IClient { public Task GetClientAssertionAsync(ClientCredentialsClientName? clientName = null, TokenRequestParameters parameters = null, - CT ct = new()) + Ct ct = new()) { var assertion = new ClientAssertion { diff --git a/identity-server/clients/src/Web/ClientAssertionService.cs b/identity-server/clients/src/Web/ClientAssertionService.cs index 9338732ed..7efcbfe07 100644 --- a/identity-server/clients/src/Web/ClientAssertionService.cs +++ b/identity-server/clients/src/Web/ClientAssertionService.cs @@ -10,7 +10,7 @@ namespace Web; public class ClientAssertionService(AssertionService assertionService) : IClientAssertionService { public Task GetClientAssertionAsync(ClientCredentialsClientName? clientName = null, TokenRequestParameters? parameters = null, - CT ct = new CT()) + Ct ct = new Ct()) { var assertion = new ClientAssertion { diff --git a/identity-server/clients/src/WindowsConsoleSystemBrowser/CallbackManager.cs b/identity-server/clients/src/WindowsConsoleSystemBrowser/CallbackManager.cs index 244ffd45d..df11bf1f1 100644 --- a/identity-server/clients/src/WindowsConsoleSystemBrowser/CallbackManager.cs +++ b/identity-server/clients/src/WindowsConsoleSystemBrowser/CallbackManager.cs @@ -26,9 +26,9 @@ internal class CallbackManager } } - public async Task RunServer(CT? token = null) + public async Task RunServer(Ct? token = null) { - token = CT.None; + token = Ct.None; await using var server = new NamedPipeServerStream(_name, PipeDirection.In); await server.WaitForConnectionAsync(token.Value); diff --git a/identity-server/hosts/EntityFramework10/TestOperationalStoreNotification.cs b/identity-server/hosts/EntityFramework10/TestOperationalStoreNotification.cs index 142fc3b05..e3a80f3e0 100644 --- a/identity-server/hosts/EntityFramework10/TestOperationalStoreNotification.cs +++ b/identity-server/hosts/EntityFramework10/TestOperationalStoreNotification.cs @@ -12,7 +12,7 @@ public class TestOperationalStoreNotification : IOperationalStoreNotification { public TestOperationalStoreNotification() => Console.WriteLine("ctor"); - public Task PersistedGrantsRemovedAsync(IEnumerable persistedGrants, CT ct) + public Task PersistedGrantsRemovedAsync(IEnumerable persistedGrants, Ct ct) { ArgumentNullException.ThrowIfNull(persistedGrants); foreach (var grant in persistedGrants) @@ -22,7 +22,7 @@ public class TestOperationalStoreNotification : IOperationalStoreNotification return Task.CompletedTask; } - public Task DeviceCodesRemovedAsync(IEnumerable deviceCodes, CT ct) + public Task DeviceCodesRemovedAsync(IEnumerable deviceCodes, Ct ct) { ArgumentNullException.ThrowIfNull(deviceCodes); foreach (var deviceCode in deviceCodes) @@ -32,7 +32,7 @@ public class TestOperationalStoreNotification : IOperationalStoreNotification return Task.CompletedTask; } - public Task ServerSideSessionsRemovedAsync(IEnumerable userSessions, CT ct = default) + public Task ServerSideSessionsRemovedAsync(IEnumerable userSessions, Ct ct = default) { ArgumentNullException.ThrowIfNull(userSessions); foreach (var session in userSessions) diff --git a/identity-server/hosts/Shared/Configuration/ClientsConsole.cs b/identity-server/hosts/Shared/Configuration/ClientsConsole.cs index c60e02fd4..e176efa47 100644 --- a/identity-server/hosts/Shared/Configuration/ClientsConsole.cs +++ b/identity-server/hosts/Shared/Configuration/ClientsConsole.cs @@ -134,7 +134,7 @@ public static class ClientsConsole { "kty":"EC", "crv":"P-256", - "x":"MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", + "x":"MKBCtNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4", "y":"4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM", "use":"enc", "kid":"1" diff --git a/identity-server/hosts/Shared/Customization/CustomClientRegistrationProcessor.cs b/identity-server/hosts/Shared/Customization/CustomClientRegistrationProcessor.cs index 608a8fb92..633170673 100644 --- a/identity-server/hosts/Shared/Customization/CustomClientRegistrationProcessor.cs +++ b/identity-server/hosts/Shared/Customization/CustomClientRegistrationProcessor.cs @@ -18,7 +18,7 @@ public sealed class CustomClientRegistrationProcessor( IClientStore clientStore) : DynamicClientRegistrationRequestProcessor(options, dcrStore) { - protected override async Task AddClientId(DynamicClientRegistrationContext context, CT ct) + protected override async Task AddClientId(DynamicClientRegistrationContext context, Ct ct) { if (context.Request.Extensions.TryGetValue("client_id", out var clientIdParameter)) { diff --git a/identity-server/hosts/Shared/Customization/DiscoveryHealthCheck.cs b/identity-server/hosts/Shared/Customization/DiscoveryHealthCheck.cs index f3acc850b..ea973bb8d 100644 --- a/identity-server/hosts/Shared/Customization/DiscoveryHealthCheck.cs +++ b/identity-server/hosts/Shared/Customization/DiscoveryHealthCheck.cs @@ -18,7 +18,7 @@ public class DiscoveryHealthCheck : IHealthCheck _httpContextAccessor = httpContextAccessor; } - public async Task CheckHealthAsync(HealthCheckContext context, CT ct = default) + public async Task CheckHealthAsync(HealthCheckContext context, Ct ct = default) { ArgumentNullException.ThrowIfNull(context); try @@ -55,7 +55,7 @@ public class DiscoveryKeysHealthCheck : IHealthCheck _httpContextAccessor = httpContextAccessor; } - public async Task CheckHealthAsync(HealthCheckContext context, CT ct = default) + public async Task CheckHealthAsync(HealthCheckContext context, Ct ct = default) { ArgumentNullException.ThrowIfNull(context); try diff --git a/identity-server/hosts/Shared/Customization/ExtensionGrantValidator.cs b/identity-server/hosts/Shared/Customization/ExtensionGrantValidator.cs index 0b3b570ce..b3f818737 100644 --- a/identity-server/hosts/Shared/Customization/ExtensionGrantValidator.cs +++ b/identity-server/hosts/Shared/Customization/ExtensionGrantValidator.cs @@ -8,7 +8,7 @@ namespace Duende.IdentityServer.Hosts.Shared.Customization; public class ExtensionGrantValidator : IExtensionGrantValidator { - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { ArgumentNullException.ThrowIfNull(context); var credential = context.Request.Raw.Get("custom_credential"); diff --git a/identity-server/hosts/Shared/Customization/HostProfileService.cs b/identity-server/hosts/Shared/Customization/HostProfileService.cs index f9f7dc4ee..1508e0761 100644 --- a/identity-server/hosts/Shared/Customization/HostProfileService.cs +++ b/identity-server/hosts/Shared/Customization/HostProfileService.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.Hosts.Shared.Customization; public class HostProfileService(TestUserStore users, ILogger logger) : TestUserProfileService(users, logger) { - public override async Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) + public override async Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) { ArgumentNullException.ThrowIfNull(context); await base.GetProfileDataAsync(context, ct); diff --git a/identity-server/hosts/Shared/Customization/NoSubjectExtensionGrantValidator.cs b/identity-server/hosts/Shared/Customization/NoSubjectExtensionGrantValidator.cs index 0a39ecd94..5261a641d 100644 --- a/identity-server/hosts/Shared/Customization/NoSubjectExtensionGrantValidator.cs +++ b/identity-server/hosts/Shared/Customization/NoSubjectExtensionGrantValidator.cs @@ -8,7 +8,7 @@ namespace Duende.IdentityServer.Hosts.Shared.Customization; public class NoSubjectExtensionGrantValidator : IExtensionGrantValidator { - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { ArgumentNullException.ThrowIfNull(context); var credential = context.Request.Raw.Get("custom_credential"); diff --git a/identity-server/hosts/Shared/Customization/ParameterizedScopeTokenRequestValidator.cs b/identity-server/hosts/Shared/Customization/ParameterizedScopeTokenRequestValidator.cs index 6ee2a07e8..d10677291 100644 --- a/identity-server/hosts/Shared/Customization/ParameterizedScopeTokenRequestValidator.cs +++ b/identity-server/hosts/Shared/Customization/ParameterizedScopeTokenRequestValidator.cs @@ -8,7 +8,7 @@ namespace Duende.IdentityServer.Hosts.Shared.Customization; public class ParameterizedScopeTokenRequestValidator : ICustomTokenRequestValidator { - public Task ValidateAsync(CustomTokenRequestValidationContext context, CT ct) + public Task ValidateAsync(CustomTokenRequestValidationContext context, Ct ct) { ArgumentNullException.ThrowIfNull(context); var transaction = context.Result?.ValidatedRequest.ValidatedResources.ParsedScopes.FirstOrDefault(x => x.ParsedName == "transaction"); diff --git a/identity-server/hosts/UI/AspNetIdentity/Pages/Account/Login/Index.cshtml.cs b/identity-server/hosts/UI/AspNetIdentity/Pages/Account/Login/Index.cshtml.cs index 99880c15a..7db379d98 100644 --- a/identity-server/hosts/UI/AspNetIdentity/Pages/Account/Login/Index.cshtml.cs +++ b/identity-server/hosts/UI/AspNetIdentity/Pages/Account/Login/Index.cshtml.cs @@ -151,7 +151,7 @@ public class Index : PageModel return Page(); } - private async Task BuildModelAsync(string? returnUrl, CT ct) + private async Task BuildModelAsync(string? returnUrl, Ct ct) { Input = new InputModel { diff --git a/identity-server/hosts/UI/Main/Pages/Account/Login/Index.cshtml.cs b/identity-server/hosts/UI/Main/Pages/Account/Login/Index.cshtml.cs index 29bf3615a..e104d71a6 100644 --- a/identity-server/hosts/UI/Main/Pages/Account/Login/Index.cshtml.cs +++ b/identity-server/hosts/UI/Main/Pages/Account/Login/Index.cshtml.cs @@ -161,7 +161,7 @@ public class Index : PageModel return Page(); } - private async Task BuildModelAsync(string? returnUrl, CT ct) + private async Task BuildModelAsync(string? returnUrl, Ct ct) { Input = new InputModel { diff --git a/identity-server/src/AspNetIdentity/DefaultSessionClaimsFilter.cs b/identity-server/src/AspNetIdentity/DefaultSessionClaimsFilter.cs index 1856f6d8a..fca0c5c6c 100644 --- a/identity-server/src/AspNetIdentity/DefaultSessionClaimsFilter.cs +++ b/identity-server/src/AspNetIdentity/DefaultSessionClaimsFilter.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.AspNetIdentity; public class DefaultSessionClaimsFilter : ISessionClaimsFilter { /// - public Task> FilterToSessionClaimsAsync(SecurityStampRefreshingPrincipalContext context, CT ct) + public Task> FilterToSessionClaimsAsync(SecurityStampRefreshingPrincipalContext context, Ct ct) { var newClaimTypes = context.NewPrincipal.Claims.Select(x => x.Type).ToArray(); var currentClaimsToKeep = context.CurrentPrincipal.Claims.Where(x => !newClaimTypes.Contains(x.Type)).ToArray(); diff --git a/identity-server/src/AspNetIdentity/ISessionClaimsFilter.cs b/identity-server/src/AspNetIdentity/ISessionClaimsFilter.cs index 43a2b76bd..b2fa59acf 100644 --- a/identity-server/src/AspNetIdentity/ISessionClaimsFilter.cs +++ b/identity-server/src/AspNetIdentity/ISessionClaimsFilter.cs @@ -18,5 +18,5 @@ public interface ISessionClaimsFilter /// in the call to . /// The cancellation token. /// The claims of the ClaimsPrincipal which should be persisted for the session. - public Task> FilterToSessionClaimsAsync(SecurityStampRefreshingPrincipalContext context, CT ct); + public Task> FilterToSessionClaimsAsync(SecurityStampRefreshingPrincipalContext context, Ct ct); } diff --git a/identity-server/src/AspNetIdentity/ProfileService.cs b/identity-server/src/AspNetIdentity/ProfileService.cs index b48bea5bb..834f28650 100644 --- a/identity-server/src/AspNetIdentity/ProfileService.cs +++ b/identity-server/src/AspNetIdentity/ProfileService.cs @@ -67,7 +67,7 @@ public class ProfileService : IProfileService /// The context. /// The cancellation token. /// - public virtual async Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) + public virtual async Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) { var sub = context.Subject?.GetSubjectId(); if (sub == null) @@ -128,7 +128,7 @@ public class ProfileService : IProfileService /// The context. /// The cancellation token. /// - public virtual async Task IsActiveAsync(IsActiveContext context, CT ct) + public virtual async Task IsActiveAsync(IsActiveContext context, Ct ct) { var sub = context.Subject?.GetSubjectId(); if (sub == null) diff --git a/identity-server/src/AspNetIdentity/ResourceOwnerPasswordValidator.cs b/identity-server/src/AspNetIdentity/ResourceOwnerPasswordValidator.cs index 5260eda99..6d686f11d 100644 --- a/identity-server/src/AspNetIdentity/ResourceOwnerPasswordValidator.cs +++ b/identity-server/src/AspNetIdentity/ResourceOwnerPasswordValidator.cs @@ -39,7 +39,7 @@ public class ResourceOwnerPasswordValidator : IResourceOwnerPasswordValid } /// - public virtual async Task ValidateAsync(ResourceOwnerPasswordValidationContext context, CT ct) + public virtual async Task ValidateAsync(ResourceOwnerPasswordValidationContext context, Ct ct) { var user = await _userManager.FindByNameAsync(context.UserName); if (user != null) diff --git a/identity-server/src/Configuration.EntityFramework/ClientConfigurationStore.cs b/identity-server/src/Configuration.EntityFramework/ClientConfigurationStore.cs index 82da46636..0319cdd61 100644 --- a/identity-server/src/Configuration.EntityFramework/ClientConfigurationStore.cs +++ b/identity-server/src/Configuration.EntityFramework/ClientConfigurationStore.cs @@ -38,7 +38,7 @@ public class ClientConfigurationStore : IClientConfigurationStore } /// - public async Task AddAsync(Client client, CT ct) + public async Task AddAsync(Client client, Ct ct) { Logger.LogDebug("Adding client {ClientId} to configuration store", client.ClientId); DbContext.Clients.Add(client.ToEntity()); diff --git a/identity-server/src/Configuration/RequestProcessing/DynamicClientRegistrationRequestProcessor.cs b/identity-server/src/Configuration/RequestProcessing/DynamicClientRegistrationRequestProcessor.cs index fe778bea8..2371eff43 100644 --- a/identity-server/src/Configuration/RequestProcessing/DynamicClientRegistrationRequestProcessor.cs +++ b/identity-server/src/Configuration/RequestProcessing/DynamicClientRegistrationRequestProcessor.cs @@ -39,7 +39,7 @@ public class DynamicClientRegistrationRequestProcessor : IDynamicClientRegistrat /// public virtual async Task ProcessAsync( - DynamicClientRegistrationContext context, CT ct) + DynamicClientRegistrationContext context, Ct ct) { var clientIdResult = await AddClientId(context, ct); if (clientIdResult is DynamicClientRegistrationError clientIdFailure) @@ -136,7 +136,7 @@ public class DynamicClientRegistrationRequestProcessor : IDynamicClientRegistrat /// The cancellation token. /// protected virtual Task AddClientId( - DynamicClientRegistrationContext context, CT ct) + DynamicClientRegistrationContext context, Ct ct) { context.Client.ClientId = CryptoRandom.CreateUniqueId(); return StepResult.Success(); diff --git a/identity-server/src/Configuration/RequestProcessing/IDynamicClientRegistrationRequestProcessor.cs b/identity-server/src/Configuration/RequestProcessing/IDynamicClientRegistrationRequestProcessor.cs index e65ef9a66..ed92d50d4 100644 --- a/identity-server/src/Configuration/RequestProcessing/IDynamicClientRegistrationRequestProcessor.cs +++ b/identity-server/src/Configuration/RequestProcessing/IDynamicClientRegistrationRequestProcessor.cs @@ -22,5 +22,5 @@ public interface IDynamicClientRegistrationRequestProcessor /// properties of the client that are not specified in the request, and /// storing the new client in the . /// - Task ProcessAsync(DynamicClientRegistrationContext validatedRequest, CT ct); + Task ProcessAsync(DynamicClientRegistrationContext validatedRequest, Ct ct); } diff --git a/identity-server/src/Configuration/ResponseGeneration/DynamicClientRegistrationResponseGenerator.cs b/identity-server/src/Configuration/ResponseGeneration/DynamicClientRegistrationResponseGenerator.cs index 7091b3849..dfe62d035 100644 --- a/identity-server/src/Configuration/ResponseGeneration/DynamicClientRegistrationResponseGenerator.cs +++ b/identity-server/src/Configuration/ResponseGeneration/DynamicClientRegistrationResponseGenerator.cs @@ -31,7 +31,7 @@ public class DynamicClientRegistrationResponseGenerator : IDynamicClientRegistra public DynamicClientRegistrationResponseGenerator(ILogger logger) => Logger = logger; /// - public virtual async Task WriteResponse(HttpContext context, int statusCode, T response, CT ct) + public virtual async Task WriteResponse(HttpContext context, int statusCode, T response, Ct ct) where T : IDynamicClientRegistrationResponse { context.Response.StatusCode = statusCode; @@ -39,7 +39,7 @@ public class DynamicClientRegistrationResponseGenerator : IDynamicClientRegistra } /// - public virtual Task WriteContentTypeError(HttpContext context, CT ct) + public virtual Task WriteContentTypeError(HttpContext context, Ct ct) { Logger.LogDebug("Invalid content type in dynamic client registration request"); context.Response.StatusCode = StatusCodes.Status415UnsupportedMediaType; @@ -47,7 +47,7 @@ public class DynamicClientRegistrationResponseGenerator : IDynamicClientRegistra } /// - public virtual async Task WriteBadRequestError(HttpContext context, CT ct) => + public virtual async Task WriteBadRequestError(HttpContext context, Ct ct) => await WriteResponse(context, StatusCodes.Status400BadRequest, new DynamicClientRegistrationError( DynamicClientRegistrationErrors.InvalidClientMetadata, @@ -56,11 +56,11 @@ public class DynamicClientRegistrationResponseGenerator : IDynamicClientRegistra ); /// - public virtual async Task WriteError(HttpContext context, DynamicClientRegistrationError error, CT ct) => + public virtual async Task WriteError(HttpContext context, DynamicClientRegistrationError error, Ct ct) => await WriteResponse(context, StatusCodes.Status400BadRequest, error, ct); /// - public virtual async Task WriteSuccessResponse(HttpContext context, DynamicClientRegistrationResponse response, CT ct) => + public virtual async Task WriteSuccessResponse(HttpContext context, DynamicClientRegistrationResponse response, Ct ct) => await WriteResponse(context, StatusCodes.Status201Created, response, ct); } diff --git a/identity-server/src/Configuration/ResponseGeneration/IDynamicClientRegistrationResponseGenerator.cs b/identity-server/src/Configuration/ResponseGeneration/IDynamicClientRegistrationResponseGenerator.cs index cc1fd6cb8..5b1e6b3b9 100644 --- a/identity-server/src/Configuration/ResponseGeneration/IDynamicClientRegistrationResponseGenerator.cs +++ b/identity-server/src/Configuration/ResponseGeneration/IDynamicClientRegistrationResponseGenerator.cs @@ -21,7 +21,7 @@ public interface IDynamicClientRegistrationResponseGenerator /// The status code to set in the response. /// The response object to write to the response. /// The cancellation token. - Task WriteResponse(HttpContext context, int statusCode, T response, CT ct) + Task WriteResponse(HttpContext context, int statusCode, T response, Ct ct) where T : IDynamicClientRegistrationResponse; /// @@ -29,14 +29,14 @@ public interface IDynamicClientRegistrationResponseGenerator /// /// The HTTP context to write the error to. /// The cancellation token. - Task WriteContentTypeError(HttpContext response, CT ct); + Task WriteContentTypeError(HttpContext response, Ct ct); /// /// Writes a bad request error to the HTTP context. /// /// The HTTP context to write the error to. /// The cancellation token. - Task WriteBadRequestError(HttpContext context, CT ct); + Task WriteBadRequestError(HttpContext context, Ct ct); /// /// Writes a success response to the HTTP context. @@ -44,7 +44,7 @@ public interface IDynamicClientRegistrationResponseGenerator /// The HTTP context to write the response to. /// The dynamic client registration response. /// The cancellation token. - Task WriteSuccessResponse(HttpContext context, DynamicClientRegistrationResponse response, CT ct); + Task WriteSuccessResponse(HttpContext context, DynamicClientRegistrationResponse response, Ct ct); /// /// Writes a validation or processing step's error to the HTTP context. @@ -52,5 +52,5 @@ public interface IDynamicClientRegistrationResponseGenerator /// The HTTP context to write the error to. /// The dynamic client registration validation error. /// The cancellation token. - Task WriteError(HttpContext context, DynamicClientRegistrationError error, CT ct); + Task WriteError(HttpContext context, DynamicClientRegistrationError error, Ct ct); } diff --git a/identity-server/src/Configuration/Stores/IClientConfigurationStore.cs b/identity-server/src/Configuration/Stores/IClientConfigurationStore.cs index 3ab0b3536..5d8bc9839 100644 --- a/identity-server/src/Configuration/Stores/IClientConfigurationStore.cs +++ b/identity-server/src/Configuration/Stores/IClientConfigurationStore.cs @@ -16,5 +16,5 @@ public interface IClientConfigurationStore /// /// The client to add to the store /// The cancellation token. - Task AddAsync(Client client, CT ct); + Task AddAsync(Client client, Ct ct); } diff --git a/identity-server/src/Configuration/Stores/InMemoryClientConfigurationStore.cs b/identity-server/src/Configuration/Stores/InMemoryClientConfigurationStore.cs index 19c2feddf..66bc0005c 100644 --- a/identity-server/src/Configuration/Stores/InMemoryClientConfigurationStore.cs +++ b/identity-server/src/Configuration/Stores/InMemoryClientConfigurationStore.cs @@ -24,7 +24,7 @@ public class InMemoryClientConfigurationStore : IClientConfigurationStore /// registered in the DI system as an ICollection. public InMemoryClientConfigurationStore(ICollection clients) => _clients = clients; /// - public Task AddAsync(Client client, CT ct) + public Task AddAsync(Client client, Ct ct) { if (_clients.Select(c => c.ClientId).Contains(client.ClientId)) { diff --git a/identity-server/src/Configuration/Validation/DynamicClientRegistration/DynamicClientRegistrationValidator.cs b/identity-server/src/Configuration/Validation/DynamicClientRegistration/DynamicClientRegistrationValidator.cs index 8d882713d..0f69ddf21 100644 --- a/identity-server/src/Configuration/Validation/DynamicClientRegistration/DynamicClientRegistrationValidator.cs +++ b/identity-server/src/Configuration/Validation/DynamicClientRegistration/DynamicClientRegistrationValidator.cs @@ -27,7 +27,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali ILogger logger) => Logger = logger; /// - public async Task ValidateAsync(DynamicClientRegistrationContext context, CT ct) + public async Task ValidateAsync(DynamicClientRegistrationContext context, Ct ct) { var result = await ValidateSoftwareStatementAsync(context, ct); if (result is DynamicClientRegistrationError softwareStatementValidation) @@ -121,7 +121,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetGrantTypesAsync(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetGrantTypesAsync(DynamicClientRegistrationContext context, Ct ct) { if (context.Request.GrantTypes.Count == 0) { @@ -222,7 +222,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetRedirectUrisAsync(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetRedirectUrisAsync(DynamicClientRegistrationContext context, Ct ct) { if (context.Client.AllowedGrantTypes.Contains(GrantType.AuthorizationCode)) { @@ -270,7 +270,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetScopesAsync(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetScopesAsync(DynamicClientRegistrationContext context, Ct ct) { if (string.IsNullOrEmpty(context.Request.Scope)) { @@ -305,7 +305,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetDefaultScopes(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetDefaultScopes(DynamicClientRegistrationContext context, Ct ct) { Logger.LogDebug("No scopes requested for dynamic client registration, and no default scope behavior implemented. To set default scopes, extend the DynamicClientRegistrationValidator and override the SetDefaultScopes method."); return StepResult.Success(); @@ -321,7 +321,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetSecretsAsync(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetSecretsAsync(DynamicClientRegistrationContext context, Ct ct) { if (context.Request.JwksUri is not null && context.Request.Jwks is not null) { @@ -406,7 +406,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetClientNameAsync(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetClientNameAsync(DynamicClientRegistrationContext context, Ct ct) { context.Client.ClientName = context.Request?.ClientName; return StepResult.Success(); @@ -426,7 +426,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetLogoutParametersAsync(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetLogoutParametersAsync(DynamicClientRegistrationContext context, Ct ct) { context.Client.PostLogoutRedirectUris = context.Request.PostLogoutRedirectUris?.Select(uri => uri.ToString()).ToList() ?? new List(); context.Client.FrontChannelLogoutUri = context.Request.FrontChannelLogoutUri?.AbsoluteUri; @@ -448,7 +448,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetMaxAgeAsync(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetMaxAgeAsync(DynamicClientRegistrationContext context, Ct ct) { if (context.Request.DefaultMaxAge.HasValue) { @@ -476,7 +476,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task ValidateSoftwareStatementAsync(DynamicClientRegistrationContext context, CT ct) => StepResult.Success(); + protected virtual Task ValidateSoftwareStatementAsync(DynamicClientRegistrationContext context, Ct ct) => StepResult.Success(); /// /// Validates the requested client parameters related to public clients and @@ -491,7 +491,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetPublicClientProperties(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetPublicClientProperties(DynamicClientRegistrationContext context, Ct ct) { context.Client.AllowedCorsOrigins = context.Request.AllowedCorsOrigins ?? new(); if (context.Request.RequireClientSecret.HasValue) @@ -519,7 +519,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetAccessTokenProperties(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetAccessTokenProperties(DynamicClientRegistrationContext context, Ct ct) { if (context.Request.AccessTokenType != null) { @@ -554,7 +554,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetIdTokenProperties(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetIdTokenProperties(DynamicClientRegistrationContext context, Ct ct) { if (context.Request.IdentityTokenLifetime.HasValue) { @@ -582,7 +582,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetServerSideSessionProperties(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetServerSideSessionProperties(DynamicClientRegistrationContext context, Ct ct) { if (context.Request.CoordinateLifetimeWithUserSession.HasValue) { @@ -603,7 +603,7 @@ public class DynamicClientRegistrationValidator : IDynamicClientRegistrationVali /// The cancellation token. /// A task that returns an , which either /// represents that this step succeeded or failed. - protected virtual Task SetUserInterfaceProperties(DynamicClientRegistrationContext context, CT ct) + protected virtual Task SetUserInterfaceProperties(DynamicClientRegistrationContext context, Ct ct) { // Misc Uris context.Client.LogoUri = context.Request.LogoUri?.ToString(); diff --git a/identity-server/src/Configuration/Validation/DynamicClientRegistration/IDynamicClientRegistrationValidator.cs b/identity-server/src/Configuration/Validation/DynamicClientRegistration/IDynamicClientRegistrationValidator.cs index 008cef971..cf8ae04c6 100644 --- a/identity-server/src/Configuration/Validation/DynamicClientRegistration/IDynamicClientRegistrationValidator.cs +++ b/identity-server/src/Configuration/Validation/DynamicClientRegistration/IDynamicClientRegistrationValidator.cs @@ -20,5 +20,5 @@ public interface IDynamicClientRegistrationValidator /// A task that returns an , which either /// indicates success or failure. - Task ValidateAsync(DynamicClientRegistrationContext context, CT ct); + Task ValidateAsync(DynamicClientRegistrationContext context, Ct ct); } diff --git a/identity-server/src/EntityFramework.Storage/Extensions/DbContextExtensions.cs b/identity-server/src/EntityFramework.Storage/Extensions/DbContextExtensions.cs index 9728d56aa..c3cc37209 100644 --- a/identity-server/src/EntityFramework.Storage/Extensions/DbContextExtensions.cs +++ b/identity-server/src/EntityFramework.Storage/Extensions/DbContextExtensions.cs @@ -18,7 +18,7 @@ public static class DbContextExtensions /// /// Saves changes and handles concurrency exceptions. /// - public static async Task> SaveChangesWithConcurrencyCheckAsync(this IPersistedGrantDbContext context, ILogger logger, CT ct) + public static async Task> SaveChangesWithConcurrencyCheckAsync(this IPersistedGrantDbContext context, ILogger logger, Ct ct) where T : class { var list = new List(); diff --git a/identity-server/src/EntityFramework.Storage/Interfaces/IConfigurationDbContext.cs b/identity-server/src/EntityFramework.Storage/Interfaces/IConfigurationDbContext.cs index e4efd57fc..710f39681 100644 --- a/identity-server/src/EntityFramework.Storage/Interfaces/IConfigurationDbContext.cs +++ b/identity-server/src/EntityFramework.Storage/Interfaces/IConfigurationDbContext.cs @@ -67,7 +67,7 @@ public interface IConfigurationDbContext : IDisposable /// Saves the changes. /// /// - Task SaveChangesAsync(CT ct); + Task SaveChangesAsync(Ct ct); // this is here only because of this: https://github.com/DuendeSoftware/IdentityServer/issues/472 // and because Microsoft implements the old API explicitly: https://github.com/dotnet/aspnetcore/blob/v6.0.0-rc.2.21480.10/src/Identity/ApiAuthorization.IdentityServer/src/Data/ApiAuthorizationDbContext.cs @@ -76,5 +76,5 @@ public interface IConfigurationDbContext : IDisposable /// Saves the changes. /// /// - Task SaveChangesAsync() => SaveChangesAsync(CT.None); + Task SaveChangesAsync() => SaveChangesAsync(Ct.None); } diff --git a/identity-server/src/EntityFramework.Storage/Interfaces/IPersistedGrantDbContext.cs b/identity-server/src/EntityFramework.Storage/Interfaces/IPersistedGrantDbContext.cs index 9a530e666..7c4d2c51a 100644 --- a/identity-server/src/EntityFramework.Storage/Interfaces/IPersistedGrantDbContext.cs +++ b/identity-server/src/EntityFramework.Storage/Interfaces/IPersistedGrantDbContext.cs @@ -59,7 +59,7 @@ public interface IPersistedGrantDbContext : IDisposable /// Saves the changes. /// /// - Task SaveChangesAsync(CT ct); + Task SaveChangesAsync(Ct ct); // this is here only because of this: https://github.com/DuendeSoftware/IdentityServer/issues/472 // and because Microsoft implements the old API explicitly: https://github.com/dotnet/aspnetcore/blob/v6.0.0-rc.2.21480.10/src/Identity/ApiAuthorization.IdentityServer/src/Data/ApiAuthorizationDbContext.cs @@ -68,5 +68,5 @@ public interface IPersistedGrantDbContext : IDisposable /// Saves the changes. /// /// - Task SaveChangesAsync() => SaveChangesAsync(CT.None); + Task SaveChangesAsync() => SaveChangesAsync(Ct.None); } diff --git a/identity-server/src/EntityFramework.Storage/Stores/ClientStore.cs b/identity-server/src/EntityFramework.Storage/Stores/ClientStore.cs index a3ee20b31..316a62821 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/ClientStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/ClientStore.cs @@ -47,7 +47,7 @@ public class ClientStore : IClientStore /// /// The client /// - public virtual async Task FindClientByIdAsync(string clientId, CT ct) + public virtual async Task FindClientByIdAsync(string clientId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ClientStore.FindClientById"); activity?.SetTag(Tracing.Properties.ClientId, clientId); @@ -81,7 +81,7 @@ public class ClientStore : IClientStore } /// - public virtual async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] CT ct) + public virtual async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ClientStore.GetAllClients"); diff --git a/identity-server/src/EntityFramework.Storage/Stores/DeviceFlowStore.cs b/identity-server/src/EntityFramework.Storage/Stores/DeviceFlowStore.cs index 42b527435..f5718288f 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/DeviceFlowStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/DeviceFlowStore.cs @@ -51,7 +51,7 @@ public class DeviceFlowStore : IDeviceFlowStore } /// - public virtual async Task StoreDeviceAuthorizationAsync(string deviceCode, string userCode, DeviceCode data, CT ct) + public virtual async Task StoreDeviceAuthorizationAsync(string deviceCode, string userCode, DeviceCode data, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.StoreDeviceAuthorization"); @@ -61,7 +61,7 @@ public class DeviceFlowStore : IDeviceFlowStore } /// - public virtual async Task FindByUserCodeAsync(string userCode, CT ct) + public virtual async Task FindByUserCodeAsync(string userCode, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.FindByUserCode"); @@ -76,7 +76,7 @@ public class DeviceFlowStore : IDeviceFlowStore } /// - public virtual async Task FindByDeviceCodeAsync(string deviceCode, CT ct) + public virtual async Task FindByDeviceCodeAsync(string deviceCode, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.FindByDeviceCode"); @@ -91,7 +91,7 @@ public class DeviceFlowStore : IDeviceFlowStore } /// - public virtual async Task UpdateByUserCodeAsync(string userCode, DeviceCode data, CT ct) + public virtual async Task UpdateByUserCodeAsync(string userCode, DeviceCode data, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.UpdateByUserCode"); @@ -122,7 +122,7 @@ public class DeviceFlowStore : IDeviceFlowStore } /// - public virtual async Task RemoveByDeviceCodeAsync(string deviceCode, CT ct) + public virtual async Task RemoveByDeviceCodeAsync(string deviceCode, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DeviceFlowStore.RemoveByDeviceCode"); diff --git a/identity-server/src/EntityFramework.Storage/Stores/IdentityProviderStore.cs b/identity-server/src/EntityFramework.Storage/Stores/IdentityProviderStore.cs index a5c48efeb..79f44d2a7 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/IdentityProviderStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/IdentityProviderStore.cs @@ -40,7 +40,7 @@ public class IdentityProviderStore : IIdentityProviderStore } /// - public async Task> GetAllSchemeNamesAsync(CT ct) + public async Task> GetAllSchemeNamesAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("IdentityProviderStore.GetAllSchemeNames"); @@ -55,7 +55,7 @@ public class IdentityProviderStore : IIdentityProviderStore } /// - public async Task GetBySchemeAsync(string scheme, CT ct) + public async Task GetBySchemeAsync(string scheme, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("IdentityProviderStore.GetByScheme"); activity?.SetTag(Tracing.Properties.Scheme, scheme); diff --git a/identity-server/src/EntityFramework.Storage/Stores/PersistedGrantStore.cs b/identity-server/src/EntityFramework.Storage/Stores/PersistedGrantStore.cs index adae13135..91f9ad22f 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/PersistedGrantStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/PersistedGrantStore.cs @@ -40,7 +40,7 @@ public class PersistedGrantStore : Duende.IdentityServer.Stores.IPersistedGrantS } /// - public virtual async Task StoreAsync(Duende.IdentityServer.Models.PersistedGrant token, CT ct) + public virtual async Task StoreAsync(Duende.IdentityServer.Models.PersistedGrant token, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PersistedGrantStore.Store"); @@ -72,7 +72,7 @@ public class PersistedGrantStore : Duende.IdentityServer.Stores.IPersistedGrantS } /// - public virtual async Task GetAsync(string key, CT ct) + public virtual async Task GetAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PersistedGrantStore.Get"); @@ -87,7 +87,7 @@ public class PersistedGrantStore : Duende.IdentityServer.Stores.IPersistedGrantS } /// - public virtual async Task> GetAllAsync(PersistedGrantFilter filter, CT ct) + public virtual async Task> GetAllAsync(PersistedGrantFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PersistedGrantStore.GetAll"); @@ -105,7 +105,7 @@ public class PersistedGrantStore : Duende.IdentityServer.Stores.IPersistedGrantS } /// - public virtual async Task RemoveAsync(string key, CT ct) + public virtual async Task RemoveAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PersistedGrantStore.Remove"); @@ -134,7 +134,7 @@ public class PersistedGrantStore : Duende.IdentityServer.Stores.IPersistedGrantS } /// - public virtual async Task RemoveAllAsync(PersistedGrantFilter filter, CT ct) + public virtual async Task RemoveAllAsync(PersistedGrantFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PersistedGrantStore.RemoveAll"); diff --git a/identity-server/src/EntityFramework.Storage/Stores/PushedAuthorizationRequestStore.cs b/identity-server/src/EntityFramework.Storage/Stores/PushedAuthorizationRequestStore.cs index 6917fce45..ea1172067 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/PushedAuthorizationRequestStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/PushedAuthorizationRequestStore.cs @@ -35,7 +35,7 @@ public class PushedAuthorizationRequestStore : IPushedAuthorizationRequestStore } /// - public async Task ConsumeByHashAsync(string referenceValueHash, CT ct) + public async Task ConsumeByHashAsync(string referenceValueHash, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PersistedGrantStore.Remove"); Logger.LogDebug("removing {referenceValueHash} pushed authorization from database", referenceValueHash); @@ -49,7 +49,7 @@ public class PushedAuthorizationRequestStore : IPushedAuthorizationRequestStore } /// - public virtual async Task GetByHashAsync(string referenceValueHash, CT ct) + public virtual async Task GetByHashAsync(string referenceValueHash, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PushedAuthorizationRequestStore.Get"); @@ -66,7 +66,7 @@ public class PushedAuthorizationRequestStore : IPushedAuthorizationRequestStore /// - public virtual async Task StoreAsync(Models.PushedAuthorizationRequest par, CT ct) + public virtual async Task StoreAsync(Models.PushedAuthorizationRequest par, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("PushedAuthorizationStore.Store"); diff --git a/identity-server/src/EntityFramework.Storage/Stores/ResourceStore.cs b/identity-server/src/EntityFramework.Storage/Stores/ResourceStore.cs index 338d6cae7..be024e192 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/ResourceStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/ResourceStore.cs @@ -46,7 +46,7 @@ public class ResourceStore : IResourceStore /// The names. /// The cancellation token. /// - public virtual async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, CT ct) + public virtual async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindApiResourcesByName"); activity?.SetTag(Tracing.Properties.ApiResourceNames, apiResourceNames.ToSpaceSeparatedString()); @@ -87,7 +87,7 @@ public class ResourceStore : IResourceStore /// /// The cancellation token. /// - public virtual async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) + public virtual async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindApiResourcesByScopeName"); activity?.SetTag(Tracing.Properties.ScopeNames, scopeNames.ToSpaceSeparatedString()); @@ -121,7 +121,7 @@ public class ResourceStore : IResourceStore /// /// The cancellation token. /// - public virtual async Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) + public virtual async Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindIdentityResourcesByScopeName"); activity?.SetTag(Tracing.Properties.ScopeNames, scopeNames.ToSpaceSeparatedString()); @@ -152,7 +152,7 @@ public class ResourceStore : IResourceStore /// /// The cancellation token. /// - public virtual async Task> FindApiScopesByNameAsync(IEnumerable scopeNames, CT ct) + public virtual async Task> FindApiScopesByNameAsync(IEnumerable scopeNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.FindApiScopesByName"); activity?.SetTag(Tracing.Properties.ScopeNames, scopeNames.ToSpaceSeparatedString()); @@ -181,7 +181,7 @@ public class ResourceStore : IResourceStore /// Gets all resources. /// /// - public virtual async Task GetAllResourcesAsync(CT ct) + public virtual async Task GetAllResourcesAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ResourceStore.GetAllResources"); diff --git a/identity-server/src/EntityFramework.Storage/Stores/ServerSideSessionStore.cs b/identity-server/src/EntityFramework.Storage/Stores/ServerSideSessionStore.cs index 7a987137b..d0ba58394 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/ServerSideSessionStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/ServerSideSessionStore.cs @@ -42,7 +42,7 @@ public class ServerSideSessionStore : IServerSideSessionStore /// - public virtual async Task CreateSessionAsync(ServerSideSession session, CT ct) + public virtual async Task CreateSessionAsync(ServerSideSession session, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.CreateSession"); @@ -72,7 +72,7 @@ public class ServerSideSessionStore : IServerSideSessionStore } /// - public virtual async Task GetSessionAsync(string key, CT ct) + public virtual async Task GetSessionAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.GetSession"); @@ -103,7 +103,7 @@ public class ServerSideSessionStore : IServerSideSessionStore } /// - public virtual async Task UpdateSessionAsync(ServerSideSession session, CT ct) + public virtual async Task UpdateSessionAsync(ServerSideSession session, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.UpdateSession"); @@ -138,7 +138,7 @@ public class ServerSideSessionStore : IServerSideSessionStore } /// - public virtual async Task DeleteSessionAsync(string key, CT ct) + public virtual async Task DeleteSessionAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.DeleteSession"); @@ -168,7 +168,7 @@ public class ServerSideSessionStore : IServerSideSessionStore /// - public virtual async Task> GetSessionsAsync(SessionFilter filter, CT ct) + public virtual async Task> GetSessionsAsync(SessionFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.GetSessions"); @@ -197,7 +197,7 @@ public class ServerSideSessionStore : IServerSideSessionStore } /// - public virtual async Task DeleteSessionsAsync(SessionFilter filter, CT ct) + public virtual async Task DeleteSessionsAsync(SessionFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.DeleteSessions"); @@ -236,7 +236,7 @@ public class ServerSideSessionStore : IServerSideSessionStore /// - public virtual async Task> GetAndRemoveExpiredSessionsAsync(int count, CT ct) + public virtual async Task> GetAndRemoveExpiredSessionsAsync(int count, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.GetAndRemoveExpiredSessions"); @@ -273,7 +273,7 @@ public class ServerSideSessionStore : IServerSideSessionStore } /// - public virtual async Task> QuerySessionsAsync(CT ct, SessionQuery filter = null) + public virtual async Task> QuerySessionsAsync(Ct ct, SessionQuery filter = null) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideSessionStore.QuerySessions"); @@ -377,7 +377,7 @@ public class ServerSideSessionStore : IServerSideSessionStore Ticket = entity.Data, }).ToArray(); - private static async Task NextPage(IQueryable query, int last, SessionPaginationContext pagination, CT ct) + private static async Task NextPage(IQueryable query, int last, SessionPaginationContext pagination, Ct ct) { pagination.Items = await query.OrderBy(x => x.Id) // if lastResultsId is zero, then this will just start at beginning @@ -405,7 +405,7 @@ public class ServerSideSessionStore : IServerSideSessionStore } } - private static async Task PreviousPage(IQueryable query, int first, SessionPaginationContext pagination, CT ct) + private static async Task PreviousPage(IQueryable query, int first, SessionPaginationContext pagination, Ct ct) { // sets query at the prior record from the last results, but in reverse order pagination.Items = await query.OrderByDescending(x => x.Id) diff --git a/identity-server/src/EntityFramework.Storage/Stores/SigningKeyStore.cs b/identity-server/src/EntityFramework.Storage/Stores/SigningKeyStore.cs index 453590b0c..fb574cf24 100644 --- a/identity-server/src/EntityFramework.Storage/Stores/SigningKeyStore.cs +++ b/identity-server/src/EntityFramework.Storage/Stores/SigningKeyStore.cs @@ -46,7 +46,7 @@ public class SigningKeyStore : ISigningKeyStore /// /// The cancellation token. /// - public async Task> LoadKeysAsync(CT ct) + public async Task> LoadKeysAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("SigningKeyStore.LoadKeys"); @@ -71,7 +71,7 @@ public class SigningKeyStore : ISigningKeyStore /// /// The cancellation token. /// - public async Task StoreKeyAsync(SerializedKey key, CT ct) + public async Task StoreKeyAsync(SerializedKey key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("SigningKeyStore.StoreKey"); @@ -96,7 +96,7 @@ public class SigningKeyStore : ISigningKeyStore /// /// The cancellation token. /// - public async Task DeleteKeyAsync(string id, CT ct) + public async Task DeleteKeyAsync(string id, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("SigningKeyStore.DeleteKey"); diff --git a/identity-server/src/EntityFramework.Storage/TokenCleanup/IOperationalStoreNotification.cs b/identity-server/src/EntityFramework.Storage/TokenCleanup/IOperationalStoreNotification.cs index 014728a7f..c14088dac 100644 --- a/identity-server/src/EntityFramework.Storage/TokenCleanup/IOperationalStoreNotification.cs +++ b/identity-server/src/EntityFramework.Storage/TokenCleanup/IOperationalStoreNotification.cs @@ -19,7 +19,7 @@ public interface IOperationalStoreNotification /// /// The cancellation token. /// - Task PersistedGrantsRemovedAsync(IEnumerable persistedGrants, CT ct); + Task PersistedGrantsRemovedAsync(IEnumerable persistedGrants, Ct ct); /// /// Notification for device codes being removed. @@ -27,5 +27,5 @@ public interface IOperationalStoreNotification /// The device codes being removed. /// The cancellation token. /// - Task DeviceCodesRemovedAsync(IEnumerable deviceCodes, CT ct); + Task DeviceCodesRemovedAsync(IEnumerable deviceCodes, Ct ct); } diff --git a/identity-server/src/EntityFramework.Storage/TokenCleanup/ITokenCleanupService.cs b/identity-server/src/EntityFramework.Storage/TokenCleanup/ITokenCleanupService.cs index b9dc69059..f5223bcb8 100644 --- a/identity-server/src/EntityFramework.Storage/TokenCleanup/ITokenCleanupService.cs +++ b/identity-server/src/EntityFramework.Storage/TokenCleanup/ITokenCleanupService.cs @@ -18,5 +18,5 @@ public interface ITokenCleanupService /// /// The cancellation token. /// - Task CleanupGrantsAsync(CT ct); + Task CleanupGrantsAsync(Ct ct); } diff --git a/identity-server/src/EntityFramework.Storage/TokenCleanup/TokenCleanupService.cs b/identity-server/src/EntityFramework.Storage/TokenCleanup/TokenCleanupService.cs index 5a6aa2ec5..d64acd443 100644 --- a/identity-server/src/EntityFramework.Storage/TokenCleanup/TokenCleanupService.cs +++ b/identity-server/src/EntityFramework.Storage/TokenCleanup/TokenCleanupService.cs @@ -43,7 +43,7 @@ public class TokenCleanupService : ITokenCleanupService } /// - public async Task CleanupGrantsAsync(CT ct) + public async Task CleanupGrantsAsync(Ct ct) { try { @@ -63,7 +63,7 @@ public class TokenCleanupService : ITokenCleanupService /// Removes the stale persisted grants. /// /// - protected virtual async Task RemoveGrantsAsync(CT ct) + protected virtual async Task RemoveGrantsAsync(Ct ct) { await RemoveExpiredPersistedGrantsAsync(ct); if (_options.RemoveConsumedTokens) @@ -76,7 +76,7 @@ public class TokenCleanupService : ITokenCleanupService /// Removes the expired persisted grants. /// /// - protected virtual async Task RemoveExpiredPersistedGrantsAsync(CT ct) + protected virtual async Task RemoveExpiredPersistedGrantsAsync(Ct ct) { var found = int.MaxValue; @@ -145,7 +145,7 @@ public class TokenCleanupService : ITokenCleanupService /// Removes the consumed persisted grants. /// /// - protected virtual async Task RemoveConsumedPersistedGrantsAsync(CT ct) + protected virtual async Task RemoveConsumedPersistedGrantsAsync(Ct ct) { var found = int.MaxValue; @@ -208,7 +208,7 @@ public class TokenCleanupService : ITokenCleanupService /// Removes the stale device codes. /// /// - protected virtual async Task RemoveDeviceCodesAsync(CT ct) + protected virtual async Task RemoveDeviceCodesAsync(Ct ct) { var found = int.MaxValue; @@ -264,7 +264,7 @@ public class TokenCleanupService : ITokenCleanupService /// /// Removes stale pushed authorization requests. /// - protected virtual async Task RemovePushedAuthorizationRequestsAsync(CT ct) + protected virtual async Task RemovePushedAuthorizationRequestsAsync(Ct ct) { var found = int.MaxValue; diff --git a/identity-server/src/EntityFramework/Services/CorsPolicyService.cs b/identity-server/src/EntityFramework/Services/CorsPolicyService.cs index 0fa4199fe..5d80c7725 100644 --- a/identity-server/src/EntityFramework/Services/CorsPolicyService.cs +++ b/identity-server/src/EntityFramework/Services/CorsPolicyService.cs @@ -39,7 +39,7 @@ public class CorsPolicyService : ICorsPolicyService } /// - public async Task IsOriginAllowedAsync(string origin, CT ct) + public async Task IsOriginAllowedAsync(string origin, Ct ct) { #pragma warning disable CA1308 // this has historically been normalized to lower case and RFC 3986 instructs to normalize to lowercase origin = origin.ToLowerInvariant(); diff --git a/identity-server/src/EntityFramework/TokenCleanupHost.cs b/identity-server/src/EntityFramework/TokenCleanupHost.cs index 7895f2c3c..4431a4aca 100644 --- a/identity-server/src/EntityFramework/TokenCleanupHost.cs +++ b/identity-server/src/EntityFramework/TokenCleanupHost.cs @@ -38,7 +38,7 @@ public class TokenCleanupHost : IHostedService /// /// Starts the token cleanup polling. /// - public Task StartAsync(CT ct) + public Task StartAsync(Ct ct) { if (_options.EnableTokenCleanup) { @@ -60,7 +60,7 @@ public class TokenCleanupHost : IHostedService /// /// Stops the token cleanup polling. /// - public async Task StopAsync(CT ct) + public async Task StopAsync(Ct ct) { if (_options.EnableTokenCleanup) { @@ -76,7 +76,7 @@ public class TokenCleanupHost : IHostedService } } - private async Task StartInternalAsync(CT ct) + private async Task StartInternalAsync(Ct ct) { // Start the first run at a random interval. var delay = _options.FuzzTokenCleanupStart @@ -121,7 +121,7 @@ public class TokenCleanupHost : IHostedService } } - private async Task RemoveExpiredGrantsAsync(CT ct) + private async Task RemoveExpiredGrantsAsync(Ct ct) { try { diff --git a/identity-server/src/IdentityServer/Endpoints/AuthorizeEndpointBase.cs b/identity-server/src/IdentityServer/Endpoints/AuthorizeEndpointBase.cs index 447033787..cbffae7cb 100644 --- a/identity-server/src/IdentityServer/Endpoints/AuthorizeEndpointBase.cs +++ b/identity-server/src/IdentityServer/Endpoints/AuthorizeEndpointBase.cs @@ -63,7 +63,7 @@ internal abstract class AuthorizeEndpointBase : IEndpointHandler public abstract Task ProcessAsync(HttpContext context); - internal async Task ProcessAuthorizeRequestAsync(NameValueCollection parameters, ClaimsPrincipal user, CT ct, bool checkConsentResponse = false) + internal async Task ProcessAuthorizeRequestAsync(NameValueCollection parameters, ClaimsPrincipal user, Ct ct, bool checkConsentResponse = false) { if (user != null) { @@ -163,7 +163,7 @@ internal abstract class AuthorizeEndpointBase : IEndpointHandler protected async Task CreateErrorResultAsync( string logMessage, - CT ct, + Ct ct, ValidatedAuthorizeRequest request = null, string error = OidcConstants.AuthorizeErrors.ServerError, string errorDescription = null, @@ -225,7 +225,7 @@ internal abstract class AuthorizeEndpointBase : IEndpointHandler } } - private Task RaiseFailureEventAsync(ValidatedAuthorizeRequest request, string error, string errorDescription, CT ct) + private Task RaiseFailureEventAsync(ValidatedAuthorizeRequest request, string error, string errorDescription, Ct ct) { Telemetry.Metrics.TokenIssuedFailure( request.ClientId, @@ -235,7 +235,7 @@ internal abstract class AuthorizeEndpointBase : IEndpointHandler return _events.RaiseAsync(new TokenIssuedFailureEvent(request, error, errorDescription), ct); } - private Task RaiseResponseEventAsync(AuthorizeResponse response, CT ct) + private Task RaiseResponseEventAsync(AuthorizeResponse response, Ct ct) { if (!response.IsError) { diff --git a/identity-server/src/IdentityServer/Endpoints/BaseDiscoveryEndpoint.cs b/identity-server/src/IdentityServer/Endpoints/BaseDiscoveryEndpoint.cs index a2cb4469f..d44a39d71 100644 --- a/identity-server/src/IdentityServer/Endpoints/BaseDiscoveryEndpoint.cs +++ b/identity-server/src/IdentityServer/Endpoints/BaseDiscoveryEndpoint.cs @@ -35,7 +35,7 @@ internal abstract class BaseDiscoveryEndpoint( } private async Task GetCachedDiscoveryDocument(IDistributedCache cache, string baseUrl, - string issuerUri, CT ct) + string issuerUri, Ct ct) { var key = $"discoveryDocument/{baseUrl}/{issuerUri}"; var json = await cache.GetStringAsync(key, ct); diff --git a/identity-server/src/IdentityServer/Endpoints/Results/AuthorizeResult.cs b/identity-server/src/IdentityServer/Endpoints/Results/AuthorizeResult.cs index cabe5a216..2bd0fde54 100644 --- a/identity-server/src/IdentityServer/Endpoints/Results/AuthorizeResult.cs +++ b/identity-server/src/IdentityServer/Endpoints/Results/AuthorizeResult.cs @@ -80,7 +80,7 @@ public class AuthorizeHttpWriter : IHttpResponseWriter } } - private async Task ConsumePushedAuthorizationRequest(AuthorizeResult result, CT ct) + private async Task ConsumePushedAuthorizationRequest(AuthorizeResult result, Ct ct) { var referenceValue = result.Response?.Request?.PushedAuthorizationReferenceValue; if (referenceValue.IsPresent()) diff --git a/identity-server/src/IdentityServer/Endpoints/Results/CheckSessionResult.cs b/identity-server/src/IdentityServer/Endpoints/Results/CheckSessionResult.cs index fb153e485..aecf38185 100644 --- a/identity-server/src/IdentityServer/Endpoints/Results/CheckSessionResult.cs +++ b/identity-server/src/IdentityServer/Endpoints/Results/CheckSessionResult.cs @@ -68,7 +68,7 @@ internal class CheckSessionHttpWriter : IHttpResponseWriter } private const string Html = @" - + diff --git a/identity-server/src/IdentityServer/Endpoints/Results/EndSessionCallbackResult.cs b/identity-server/src/IdentityServer/Endpoints/Results/EndSessionCallbackResult.cs index 18ab5395b..a14605ad7 100644 --- a/identity-server/src/IdentityServer/Endpoints/Results/EndSessionCallbackResult.cs +++ b/identity-server/src/IdentityServer/Endpoints/Results/EndSessionCallbackResult.cs @@ -80,7 +80,7 @@ internal class EndSessionCallbackHttpWriter : IHttpResponseWriter"); + sb.Append(""); if (result.Result.FrontChannelLogoutUrls != null) { diff --git a/identity-server/src/IdentityServer/Extensions/IClientStoreExtensions.cs b/identity-server/src/IdentityServer/Extensions/IClientStoreExtensions.cs index 4085de997..8ab4c206d 100644 --- a/identity-server/src/IdentityServer/Extensions/IClientStoreExtensions.cs +++ b/identity-server/src/IdentityServer/Extensions/IClientStoreExtensions.cs @@ -18,7 +18,7 @@ public static class IClientStoreExtensions /// The client identifier. /// The cancellation token. /// - public static async Task FindEnabledClientByIdAsync(this IClientStore store, string clientId, CT ct) + public static async Task FindEnabledClientByIdAsync(this IClientStore store, string clientId, Ct ct) { var client = await store.FindClientByIdAsync(clientId, ct); if (client != null && client.Enabled) diff --git a/identity-server/src/IdentityServer/Extensions/IResourceStoreExtensions.cs b/identity-server/src/IdentityServer/Extensions/IResourceStoreExtensions.cs index aff660353..fada564ac 100644 --- a/identity-server/src/IdentityServer/Extensions/IResourceStoreExtensions.cs +++ b/identity-server/src/IdentityServer/Extensions/IResourceStoreExtensions.cs @@ -18,7 +18,7 @@ public static class IResourceStoreExtensions /// The scope names. /// The cancellation token. /// - public static async Task FindResourcesByScopeAsync(this IResourceStore store, IEnumerable scopeNames, CT ct) + public static async Task FindResourcesByScopeAsync(this IResourceStore store, IEnumerable scopeNames, Ct ct) { var identity = await store.FindIdentityResourcesByScopeNameAsync(scopeNames, ct); var apiResources = await store.FindApiResourcesByScopeNameAsync(scopeNames, ct); @@ -91,7 +91,7 @@ public static class IResourceStoreExtensions /// The scope names. /// The cancellation token. /// - public static async Task FindEnabledResourcesByScopeAsync(this IResourceStore store, IEnumerable scopeNames, CT ct) => (await store.FindResourcesByScopeAsync(scopeNames, ct)).FilterEnabled(); + public static async Task FindEnabledResourcesByScopeAsync(this IResourceStore store, IEnumerable scopeNames, Ct ct) => (await store.FindResourcesByScopeAsync(scopeNames, ct)).FilterEnabled(); /// /// Gets all enabled resources. @@ -99,7 +99,7 @@ public static class IResourceStoreExtensions /// The store. /// The cancellation token. /// - public static async Task GetAllEnabledResourcesAsync(this IResourceStore store, CT ct) + public static async Task GetAllEnabledResourcesAsync(this IResourceStore store, Ct ct) { var resources = await store.GetAllResourcesAsync(ct); ValidateNameUniqueness(resources.IdentityResources, resources.ApiResources, resources.ApiScopes); @@ -114,7 +114,7 @@ public static class IResourceStoreExtensions /// The scope names. /// The cancellation token. /// - public static async Task> FindEnabledIdentityResourcesByScopeAsync(this IResourceStore store, IEnumerable scopeNames, CT ct) => (await store.FindIdentityResourcesByScopeNameAsync(scopeNames, ct)).Where(x => x.Enabled).ToArray(); + public static async Task> FindEnabledIdentityResourcesByScopeAsync(this IResourceStore store, IEnumerable scopeNames, Ct ct) => (await store.FindIdentityResourcesByScopeNameAsync(scopeNames, ct)).Where(x => x.Enabled).ToArray(); /// /// Finds the enabled API resources by name. @@ -122,5 +122,5 @@ public static class IResourceStoreExtensions /// The store. /// The resource names. /// The cancellation token. - public static async Task> FindEnabledApiResourcesByNameAsync(this IResourceStore store, IEnumerable resourceNames, CT ct) => (await store.FindApiResourcesByNameAsync(resourceNames, ct)).Where(x => x.Enabled).ToArray(); + public static async Task> FindEnabledApiResourcesByNameAsync(this IResourceStore store, IEnumerable resourceNames, Ct ct) => (await store.FindApiResourcesByNameAsync(resourceNames, ct)).Where(x => x.Enabled).ToArray(); } diff --git a/identity-server/src/IdentityServer/Extensions/NameValueCollectionExtensions.cs b/identity-server/src/IdentityServer/Extensions/NameValueCollectionExtensions.cs index 870e22472..b08723303 100644 --- a/identity-server/src/IdentityServer/Extensions/NameValueCollectionExtensions.cs +++ b/identity-server/src/IdentityServer/Extensions/NameValueCollectionExtensions.cs @@ -111,7 +111,7 @@ internal static class NameValueCollectionExtensions { if (nameFilter.Contains(name, StringComparer.OrdinalIgnoreCase)) { - value = "***REDACTED***"; + value = "***REDACtED***"; } dict.Add(name, value); } diff --git a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/CachingIdentityProviderStore.cs b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/CachingIdentityProviderStore.cs index fb8f6c37e..8d4baa2a0 100644 --- a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/CachingIdentityProviderStore.cs +++ b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/CachingIdentityProviderStore.cs @@ -51,7 +51,7 @@ public class CachingIdentityProviderStore : IIdentityProviderStore } /// - public async Task> GetAllSchemeNamesAsync(CT ct) + public async Task> GetAllSchemeNamesAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingIdentityProviderStore.GetAllSchemeNames"); @@ -63,7 +63,7 @@ public class CachingIdentityProviderStore : IIdentityProviderStore } /// - public async Task GetBySchemeAsync(string scheme, CT ct) + public async Task GetBySchemeAsync(string scheme, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingIdentityProviderStore.GetByScheme"); diff --git a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/InMemoryIdentityProviderStore.cs b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/InMemoryIdentityProviderStore.cs index 8cb34904b..4b44a4418 100644 --- a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/InMemoryIdentityProviderStore.cs +++ b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/InMemoryIdentityProviderStore.cs @@ -13,7 +13,7 @@ internal class InMemoryIdentityProviderStore : IIdentityProviderStore public InMemoryIdentityProviderStore(IEnumerable providers) => _providers = providers; - public Task> GetAllSchemeNamesAsync(CT ct) + public Task> GetAllSchemeNamesAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryOidcProviderStore.GetAllSchemeNames"); @@ -27,7 +27,7 @@ internal class InMemoryIdentityProviderStore : IIdentityProviderStore return Task.FromResult(items); } - public Task GetBySchemeAsync(string scheme, CT ct) + public Task GetBySchemeAsync(string scheme, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryOidcProviderStore.GetByScheme"); diff --git a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NonCachingIdentityProviderStore.cs b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NonCachingIdentityProviderStore.cs index e53db79cc..f25f55a72 100644 --- a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NonCachingIdentityProviderStore.cs +++ b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NonCachingIdentityProviderStore.cs @@ -38,10 +38,10 @@ public class NonCachingIdentityProviderStore : IIdentityProviderStore } /// - public Task> GetAllSchemeNamesAsync(CT ct) => _inner.GetAllSchemeNamesAsync(ct); + public Task> GetAllSchemeNamesAsync(Ct ct) => _inner.GetAllSchemeNamesAsync(ct); /// - public async Task GetBySchemeAsync(string scheme, CT ct) + public async Task GetBySchemeAsync(string scheme, Ct ct) { if (_httpContextAccessor.HttpContext == null) { diff --git a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NopIdentityProviderStore.cs b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NopIdentityProviderStore.cs index c5d2dd833..0e7bcd5a2 100644 --- a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NopIdentityProviderStore.cs +++ b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/NopIdentityProviderStore.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.Hosting.DynamicProviders; internal class NopIdentityProviderStore : IIdentityProviderStore { - public Task> GetAllSchemeNamesAsync(CT ct) => Task.FromResult(Enumerable.Empty()); + public Task> GetAllSchemeNamesAsync(Ct ct) => Task.FromResult(Enumerable.Empty()); - public Task GetBySchemeAsync(string scheme, CT ct) => Task.FromResult(null); + public Task GetBySchemeAsync(string scheme, Ct ct) => Task.FromResult(null); } diff --git a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/ValidatingIdentityProviderStore.cs b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/ValidatingIdentityProviderStore.cs index a0a753f42..1185ec479 100644 --- a/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/ValidatingIdentityProviderStore.cs +++ b/identity-server/src/IdentityServer/Hosting/DynamicProviders/Store/ValidatingIdentityProviderStore.cs @@ -38,10 +38,10 @@ public class ValidatingIdentityProviderStore : IIdentityProviderStore } /// - public Task> GetAllSchemeNamesAsync(CT ct) => _inner.GetAllSchemeNamesAsync(ct); + public Task> GetAllSchemeNamesAsync(Ct ct) => _inner.GetAllSchemeNamesAsync(ct); /// - public async Task GetBySchemeAsync(string scheme, CT ct) + public async Task GetBySchemeAsync(string scheme, Ct ct) { var idp = await _inner.GetBySchemeAsync(scheme, ct); diff --git a/identity-server/src/IdentityServer/Hosting/ServerSideSessionCleanupHost.cs b/identity-server/src/IdentityServer/Hosting/ServerSideSessionCleanupHost.cs index 07c33ed3b..8e603b760 100644 --- a/identity-server/src/IdentityServer/Hosting/ServerSideSessionCleanupHost.cs +++ b/identity-server/src/IdentityServer/Hosting/ServerSideSessionCleanupHost.cs @@ -19,13 +19,13 @@ public class ServerSideSessionCleanupHost( ILogger logger) : BackgroundService { /// - public override Task StartAsync(CT ct) => + public override Task StartAsync(Ct ct) => !options.ServerSideSessions.RemoveExpiredSessions ? Task.CompletedTask : base.StartAsync(ct); /// - protected override async Task ExecuteAsync(CT stoppingToken) + protected override async Task ExecuteAsync(Ct stoppingToken) { logger.LogDebug("Starting server-side session removal"); @@ -68,7 +68,7 @@ public class ServerSideSessionCleanupHost( logger.LogDebug("Stopping server-side session removal"); } - private async Task RunAsync(CT ct) + private async Task RunAsync(Ct ct) { // this is here for testing if (!options.ServerSideSessions.RemoveExpiredSessions) diff --git a/identity-server/src/IdentityServer/IdentityServerTools.cs b/identity-server/src/IdentityServer/IdentityServerTools.cs index eaf41cc23..9cf815b2c 100644 --- a/identity-server/src/IdentityServer/IdentityServerTools.cs +++ b/identity-server/src/IdentityServer/IdentityServerTools.cs @@ -35,7 +35,7 @@ public interface IIdentityServerTools /// of the token. Ensure that calls to this method will only occur if there /// is an incoming HTTP request or with the option set. /// - Task IssueJwtAsync(int lifetime, IEnumerable claims, CT ct); + Task IssueJwtAsync(int lifetime, IEnumerable claims, Ct ct); /// /// Issues a JWT with a specific lifetime, issuer, and set of claims. @@ -49,7 +49,7 @@ public interface IIdentityServerTools /// The cancellation token. /// A JWT with the specified lifetime, issuer and additional /// claims. - Task IssueJwtAsync(int lifetime, string issuer, IEnumerable claims, CT ct); + Task IssueJwtAsync(int lifetime, string issuer, IEnumerable claims, Ct ct); /// /// Issues a JWT with a specific lifetime, issuer, token type, and set of @@ -66,7 +66,7 @@ public interface IIdentityServerTools /// The cancellation token. /// A JWT with the specified lifetime, issuer, token type, and /// additional claims. - Task IssueJwtAsync(int lifetime, string issuer, string tokenType, IEnumerable claims, CT ct); + Task IssueJwtAsync(int lifetime, string issuer, string tokenType, IEnumerable claims, Ct ct); /// /// Issues a JWT access token for a particular client. @@ -92,7 +92,7 @@ public interface IIdentityServerTools Task IssueClientJwtAsync( string clientId, int lifetime, - CT ct, + Ct ct, IEnumerable? scopes = null, IEnumerable? audiences = null, IEnumerable? additionalClaims = null); @@ -118,21 +118,21 @@ public class IdentityServerTools : IIdentityServerTools } /// - public virtual async Task IssueJwtAsync(int lifetime, IEnumerable claims, CT ct) + public virtual async Task IssueJwtAsync(int lifetime, IEnumerable claims, Ct ct) { var issuer = await _issuerNameService.GetCurrentAsync(ct); return await IssueJwtAsync(lifetime, issuer, claims, ct); } /// - public virtual Task IssueJwtAsync(int lifetime, string issuer, IEnumerable claims, CT ct) + public virtual Task IssueJwtAsync(int lifetime, string issuer, IEnumerable claims, Ct ct) { var tokenType = OidcConstants.TokenTypes.AccessToken; return IssueJwtAsync(lifetime, issuer, tokenType, claims, ct); } /// - public virtual async Task IssueJwtAsync(int lifetime, string issuer, string tokenType, IEnumerable claims, CT ct) + public virtual async Task IssueJwtAsync(int lifetime, string issuer, string tokenType, IEnumerable claims, Ct ct) { ArgumentException.ThrowIfNullOrWhiteSpace(issuer); ArgumentException.ThrowIfNullOrWhiteSpace(tokenType); @@ -154,7 +154,7 @@ public class IdentityServerTools : IIdentityServerTools public virtual async Task IssueClientJwtAsync( string clientId, int lifetime, - CT ct, + Ct ct, IEnumerable? scopes = null, IEnumerable? audiences = null, IEnumerable? additionalClaims = null) diff --git a/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticHostedService.cs b/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticHostedService.cs index 8e0f583f5..9af32b589 100644 --- a/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticHostedService.cs +++ b/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticHostedService.cs @@ -10,7 +10,7 @@ namespace Duende.IdentityServer.Licensing.V2.Diagnostics; internal class DiagnosticHostedService(DiagnosticSummary diagnosticSummary, IOptions options, ILogger logger) : BackgroundService { - protected override async Task ExecuteAsync(CT stoppingToken) + protected override async Task ExecuteAsync(Ct stoppingToken) { using var timer = new PeriodicTimer(options.Value.Diagnostics.LogFrequency); try @@ -35,9 +35,9 @@ internal class DiagnosticHostedService(DiagnosticSummary diagnosticSummary, IOpt } // Added for testing purposes to be able to call ExecuteAsync directly. - internal Task ExecuteForTestOnly(CT stoppingToken) => ExecuteAsync(stoppingToken); + internal Task ExecuteForTestOnly(Ct stoppingToken) => ExecuteAsync(stoppingToken); - public override async Task StopAsync(CT ct) + public override async Task StopAsync(Ct ct) { await diagnosticSummary.PrintSummary(ct); diff --git a/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticSummary.cs b/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticSummary.cs index f0240508e..cf44f96af 100644 --- a/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticSummary.cs +++ b/identity-server/src/IdentityServer/Licensing/V2/Diagnostics/DiagnosticSummary.cs @@ -12,7 +12,7 @@ internal class DiagnosticSummary(DiagnosticDataService diagnosticDataService, Id { private readonly ILogger _logger = loggerFactory.CreateLogger("Duende.IdentityServer.Diagnostics.Summary"); - public async Task PrintSummary(CT ct) + public async Task PrintSummary(Ct ct) { var jsonMemory = await diagnosticDataService.GetJsonBytesAsync(ct); var span = jsonMemory.Span; diff --git a/identity-server/src/IdentityServer/Logging/Models/TokenRequestValidationLog.cs b/identity-server/src/IdentityServer/Logging/Models/TokenRequestValidationLog.cs index c571b1681..1f5ec3767 100644 --- a/identity-server/src/IdentityServer/Logging/Models/TokenRequestValidationLog.cs +++ b/identity-server/src/IdentityServer/Logging/Models/TokenRequestValidationLog.cs @@ -50,7 +50,7 @@ internal class TokenRequestValidationLog } else if (request.UserName.IsPresent()) { - UserName = "***REDACTED***"; + UserName = "***REDACtED***"; } } diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeInteractionResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeInteractionResponseGenerator.cs index 70ef66eb1..36d7cde45 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeInteractionResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeInteractionResponseGenerator.cs @@ -72,7 +72,7 @@ public class AuthorizeInteractionResponseGenerator : IAuthorizeInteractionRespon /// The consent. /// The cancellation token. /// - public virtual async Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, CT ct) + public virtual async Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("AuthorizeInteractionResponseGenerator.ProcessInteraction"); activity?.SetTag(Tracing.Properties.ClientId, request.Client.ClientId); @@ -137,7 +137,7 @@ public class AuthorizeInteractionResponseGenerator : IAuthorizeInteractionRespon /// The request. /// The cancellation token. /// - protected internal virtual Task ProcessCreateAccountAsync(ValidatedAuthorizeRequest request, CT ct) + protected internal virtual Task ProcessCreateAccountAsync(ValidatedAuthorizeRequest request, Ct ct) { InteractionResponse result; @@ -165,7 +165,7 @@ public class AuthorizeInteractionResponseGenerator : IAuthorizeInteractionRespon /// The request. /// The cancellation token. /// - protected internal virtual async Task ProcessLoginAsync(ValidatedAuthorizeRequest request, CT ct) + protected internal virtual async Task ProcessLoginAsync(ValidatedAuthorizeRequest request, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("AuthorizeInteractionResponseGenerator.ProcessLogin"); @@ -312,7 +312,7 @@ public class AuthorizeInteractionResponseGenerator : IAuthorizeInteractionRespon /// /// /// Invalid PromptMode - protected internal virtual async Task ProcessConsentAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, CT ct) + protected internal virtual async Task ProcessConsentAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("AuthorizeInteractionResponseGenerator.ProcessConsent"); diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeResponseGenerator.cs index f5133b144..9954f85d7 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/AuthorizeResponseGenerator.cs @@ -83,7 +83,7 @@ public class AuthorizeResponseGenerator : IAuthorizeResponseGenerator } /// - public virtual async Task CreateResponseAsync(ValidatedAuthorizeRequest request, CT ct) + public virtual async Task CreateResponseAsync(ValidatedAuthorizeRequest request, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("AuthorizeResponseGenerator.CreateResponse"); @@ -110,7 +110,7 @@ public class AuthorizeResponseGenerator : IAuthorizeResponseGenerator /// /// The cancellation token. /// - protected virtual async Task CreateHybridFlowResponseAsync(ValidatedAuthorizeRequest request, CT ct) + protected virtual async Task CreateHybridFlowResponseAsync(ValidatedAuthorizeRequest request, Ct ct) { Logger.LogDebug("Creating Hybrid Flow response."); @@ -129,7 +129,7 @@ public class AuthorizeResponseGenerator : IAuthorizeResponseGenerator /// /// The cancellation token. /// - protected virtual async Task CreateCodeFlowResponseAsync(ValidatedAuthorizeRequest request, CT ct) + protected virtual async Task CreateCodeFlowResponseAsync(ValidatedAuthorizeRequest request, Ct ct) { Logger.LogDebug("Creating Authorization Code Flow response."); @@ -154,7 +154,7 @@ public class AuthorizeResponseGenerator : IAuthorizeResponseGenerator /// The cancellation token. /// /// - protected virtual async Task CreateImplicitFlowResponseAsync(ValidatedAuthorizeRequest request, CT ct, string authorizationCode = null) + protected virtual async Task CreateImplicitFlowResponseAsync(ValidatedAuthorizeRequest request, Ct ct, string authorizationCode = null) { Logger.LogDebug("Creating Implicit Flow response."); @@ -231,7 +231,7 @@ public class AuthorizeResponseGenerator : IAuthorizeResponseGenerator /// /// The cancellation token. /// - protected virtual async Task CreateCodeAsync(ValidatedAuthorizeRequest request, CT ct) + protected virtual async Task CreateCodeAsync(ValidatedAuthorizeRequest request, Ct ct) { string stateHash = null; if (Options.EmitStateHash && request.State.IsPresent()) diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/BackchannelAuthenticationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/BackchannelAuthenticationResponseGenerator.cs index 913dd9b2a..7bad0f2ac 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/BackchannelAuthenticationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/BackchannelAuthenticationResponseGenerator.cs @@ -64,7 +64,7 @@ public class BackchannelAuthenticationResponseGenerator : IBackchannelAuthentica } /// - public virtual async Task ProcessAsync(BackchannelAuthenticationRequestValidationResult validationResult, CT ct) + public virtual async Task ProcessAsync(BackchannelAuthenticationRequestValidationResult validationResult, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("BackchannelAuthenticationResponseGenerator.Process"); diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/DeviceAuthorizationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/DeviceAuthorizationResponseGenerator.cs index daec9fc08..07f38738c 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/DeviceAuthorizationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/DeviceAuthorizationResponseGenerator.cs @@ -60,7 +60,7 @@ public class DeviceAuthorizationResponseGenerator : IDeviceAuthorizationResponse } /// - public virtual async Task ProcessAsync(DeviceAuthorizationRequestValidationResult validationResult, string baseUrl, CT ct) + public virtual async Task ProcessAsync(DeviceAuthorizationRequestValidationResult validationResult, string baseUrl, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("DeviceAuthorizationResponseGenerator.Process"); diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/DiscoveryResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/DiscoveryResponseGenerator.cs index b472bbbde..4aa17934d 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/DiscoveryResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/DiscoveryResponseGenerator.cs @@ -93,7 +93,7 @@ public class DiscoveryResponseGenerator : IDiscoveryResponseGenerator /// The base URL. /// The issuer URI. /// The cancellation token. - public virtual async Task> CreateDiscoveryDocumentAsync(string baseUrl, string issuerUri, CT ct) + public virtual async Task> CreateDiscoveryDocumentAsync(string baseUrl, string issuerUri, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("DiscoveryResponseGenerator.CreateDiscoveryDocument"); @@ -460,7 +460,7 @@ public class DiscoveryResponseGenerator : IDiscoveryResponseGenerator /// Creates the JWK document. /// /// The cancellation token. - public virtual async Task> CreateJwkDocumentAsync(CT ct) + public virtual async Task> CreateJwkDocumentAsync(Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("DiscoveryResponseGenerator.CreateJwkDocument"); diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/IntrospectionResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/IntrospectionResponseGenerator.cs index 2fc0a9d58..318786599 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/IntrospectionResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/IntrospectionResponseGenerator.cs @@ -47,7 +47,7 @@ public class IntrospectionResponseGenerator : IIntrospectionResponseGenerator /// The validation result. /// The cancellation token. /// - public virtual async Task> ProcessAsync(IntrospectionRequestValidationResult validationResult, CT ct) + public virtual async Task> ProcessAsync(IntrospectionRequestValidationResult validationResult, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("IntrospectionResponseGenerator.Process"); @@ -109,7 +109,7 @@ public class IntrospectionResponseGenerator : IIntrospectionResponseGenerator /// The validation result. /// The cancellation token. /// - protected virtual async Task AreExpectedScopesPresentAsync(IntrospectionRequestValidationResult validationResult, CT ct) + protected virtual async Task AreExpectedScopesPresentAsync(IntrospectionRequestValidationResult validationResult, Ct ct) { var apiScopes = validationResult.Api.Scopes; var tokenScopes = validationResult.Claims.Where(c => c.Type == JwtClaimTypes.Scope); diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/PushedAuthorizationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/PushedAuthorizationResponseGenerator.cs index 184a5514f..72a3ddc77 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/PushedAuthorizationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/PushedAuthorizationResponseGenerator.cs @@ -37,7 +37,7 @@ public class PushedAuthorizationResponseGenerator : IPushedAuthorizationResponse } /// - public async Task CreateResponseAsync(ValidatedPushedAuthorizationRequest request, CT ct) + public async Task CreateResponseAsync(ValidatedPushedAuthorizationRequest request, Ct ct) { // Create a reference value var referenceValue = await _handleGeneration.GenerateAsync(ct); diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/TokenResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/TokenResponseGenerator.cs index 9cf1346d6..c1d3db214 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/TokenResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/TokenResponseGenerator.cs @@ -80,7 +80,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The request. /// The cancellation token. /// - public virtual async Task ProcessAsync(TokenRequestValidationResult request, CT ct) + public virtual async Task ProcessAsync(TokenRequestValidationResult request, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenResponseGenerator.Process"); activity?.SetTag(Tracing.Properties.GrantType, request.ValidatedRequest.GrantType); @@ -104,7 +104,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The request. /// The cancellation token. /// - protected virtual Task ProcessClientCredentialsRequestAsync(TokenRequestValidationResult request, CT ct) + protected virtual Task ProcessClientCredentialsRequestAsync(TokenRequestValidationResult request, Ct ct) { Logger.LogTrace("Creating response for client credentials request"); @@ -117,7 +117,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The request. /// The cancellation token. /// - protected virtual Task ProcessPasswordRequestAsync(TokenRequestValidationResult request, CT ct) + protected virtual Task ProcessPasswordRequestAsync(TokenRequestValidationResult request, Ct ct) { Logger.LogTrace("Creating response for password request"); @@ -131,7 +131,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The cancellation token. /// /// Client does not exist anymore. - protected virtual async Task ProcessAuthorizationCodeRequestAsync(TokenRequestValidationResult request, CT ct) + protected virtual async Task ProcessAuthorizationCodeRequestAsync(TokenRequestValidationResult request, Ct ct) { Logger.LogTrace("Creating response for authorization code request"); @@ -175,7 +175,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The request. /// The cancellation token. /// - protected virtual async Task ProcessRefreshTokenRequestAsync(TokenRequestValidationResult request, CT ct) + protected virtual async Task ProcessRefreshTokenRequestAsync(TokenRequestValidationResult request, Ct ct) { Logger.LogTrace("Creating response for refresh token request"); @@ -236,7 +236,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The request. /// The cancellation token. /// - protected virtual async Task ProcessDeviceCodeRequestAsync(TokenRequestValidationResult request, CT ct) + protected virtual async Task ProcessDeviceCodeRequestAsync(TokenRequestValidationResult request, Ct ct) { Logger.LogTrace("Creating response for device code request"); @@ -278,7 +278,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The request. /// The cancellation token. /// - protected virtual async Task ProcessCibaRequestAsync(TokenRequestValidationResult request, CT ct) + protected virtual async Task ProcessCibaRequestAsync(TokenRequestValidationResult request, Ct ct) { Logger.LogTrace("Creating response for CIBA request"); @@ -317,7 +317,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The request. /// The cancellation token. /// - protected virtual Task ProcessExtensionGrantRequestAsync(TokenRequestValidationResult request, CT ct) + protected virtual Task ProcessExtensionGrantRequestAsync(TokenRequestValidationResult request, Ct ct) { Logger.LogTrace("Creating response for extension grant request"); @@ -328,7 +328,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// Creates a response for a token request containing an access token and a /// refresh token if requested. /// - protected virtual async Task ProcessTokenRequestAsync(TokenRequestValidationResult validationResult, CT ct) + protected virtual async Task ProcessTokenRequestAsync(TokenRequestValidationResult validationResult, Ct ct) { (var accessToken, var refreshToken) = await CreateAccessTokenAsync(validationResult.ValidatedRequest, ct); var response = new TokenResponse @@ -356,7 +356,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The cancellation token. /// /// Client does not exist anymore. - protected virtual async Task<(string accessToken, string refreshToken)> CreateAccessTokenAsync(ValidatedTokenRequest request, CT ct) + protected virtual async Task<(string accessToken, string refreshToken)> CreateAccessTokenAsync(ValidatedTokenRequest request, Ct ct) { var tokenRequest = new TokenCreationRequest { @@ -463,7 +463,7 @@ public class TokenResponseGenerator : ITokenResponseGenerator /// The new access token. /// The cancellation token. /// - protected virtual async Task CreateIdTokenFromRefreshTokenRequestAsync(ValidatedTokenRequest request, string newAccessToken, CT ct) + protected virtual async Task CreateIdTokenFromRefreshTokenRequestAsync(ValidatedTokenRequest request, string newAccessToken, Ct ct) { if (request.RefreshToken.AuthorizedScopes.Contains(OidcConstants.StandardScopes.OpenId)) { diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/TokenRevocationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/TokenRevocationResponseGenerator.cs index f144f59c6..a501875a2 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/TokenRevocationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/TokenRevocationResponseGenerator.cs @@ -52,7 +52,7 @@ public class TokenRevocationResponseGenerator : ITokenRevocationResponseGenerato } /// - public virtual async Task ProcessAsync(TokenRevocationRequestValidationResult validationResult, CT ct) + public virtual async Task ProcessAsync(TokenRevocationRequestValidationResult validationResult, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenRevocationResponseGenerator.Process"); @@ -96,7 +96,7 @@ public class TokenRevocationResponseGenerator : ITokenRevocationResponseGenerato /// /// Revoke access token only if it belongs to client doing the request. /// - protected virtual async Task RevokeAccessTokenAsync(TokenRevocationRequestValidationResult validationResult, CT ct) + protected virtual async Task RevokeAccessTokenAsync(TokenRevocationRequestValidationResult validationResult, Ct ct) { var token = await ReferenceTokenStore.GetReferenceTokenAsync(validationResult.Token, ct); @@ -121,7 +121,7 @@ public class TokenRevocationResponseGenerator : ITokenRevocationResponseGenerato /// /// Revoke refresh token only if it belongs to client doing the request /// - protected virtual async Task RevokeRefreshTokenAsync(TokenRevocationRequestValidationResult validationResult, CT ct) + protected virtual async Task RevokeRefreshTokenAsync(TokenRevocationRequestValidationResult validationResult, Ct ct) { var token = await RefreshTokenStore.GetRefreshTokenAsync(validationResult.Token, ct); diff --git a/identity-server/src/IdentityServer/ResponseHandling/Default/UserInfoResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/Default/UserInfoResponseGenerator.cs index 7a34830e3..33db09f9d 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/Default/UserInfoResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/Default/UserInfoResponseGenerator.cs @@ -54,7 +54,7 @@ public class UserInfoResponseGenerator : IUserInfoResponseGenerator /// The cancellation token. /// /// Profile service returned incorrect subject value - public virtual async Task> ProcessAsync(UserInfoRequestValidationResult validationResult, CT ct) + public virtual async Task> ProcessAsync(UserInfoRequestValidationResult validationResult, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("UserInfoResponseGenerator.Process"); @@ -112,7 +112,7 @@ public class UserInfoResponseGenerator : IUserInfoResponseGenerator /// /// The cancellation token. /// - protected internal virtual async Task GetRequestedResourcesAsync(IEnumerable scopes, CT ct) + protected internal virtual async Task GetRequestedResourcesAsync(IEnumerable scopes, Ct ct) { if (scopes == null || !scopes.Any()) { diff --git a/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeInteractionResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeInteractionResponseGenerator.cs index 2abed1ba3..72c76b9f8 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeInteractionResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeInteractionResponseGenerator.cs @@ -21,5 +21,5 @@ public interface IAuthorizeInteractionResponseGenerator /// The consent. /// The cancellation token. /// - Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse? consent, CT ct); + Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse? consent, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeResponseGenerator.cs index 4a422988b..301abee0a 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IAuthorizeResponseGenerator.cs @@ -17,5 +17,5 @@ public interface IAuthorizeResponseGenerator /// The request. /// The cancellation token. /// - Task CreateResponseAsync(ValidatedAuthorizeRequest request, CT ct); + Task CreateResponseAsync(ValidatedAuthorizeRequest request, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/IBackchannelAuthenticationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IBackchannelAuthenticationResponseGenerator.cs index b8392de7c..0cd82a659 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IBackchannelAuthenticationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IBackchannelAuthenticationResponseGenerator.cs @@ -17,5 +17,5 @@ public interface IBackchannelAuthenticationResponseGenerator /// The validation result. /// The cancellation token. /// - Task ProcessAsync(BackchannelAuthenticationRequestValidationResult validationResult, CT ct); + Task ProcessAsync(BackchannelAuthenticationRequestValidationResult validationResult, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/IDeviceAuthorizationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IDeviceAuthorizationResponseGenerator.cs index 65ce1fcb8..a974b7d4f 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IDeviceAuthorizationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IDeviceAuthorizationResponseGenerator.cs @@ -18,5 +18,5 @@ public interface IDeviceAuthorizationResponseGenerator /// The base URL. /// The cancellation token. /// - Task ProcessAsync(DeviceAuthorizationRequestValidationResult validationResult, string baseUrl, CT ct); + Task ProcessAsync(DeviceAuthorizationRequestValidationResult validationResult, string baseUrl, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/IDiscoveryResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IDiscoveryResponseGenerator.cs index d65cf4a6a..365c6b5df 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IDiscoveryResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IDiscoveryResponseGenerator.cs @@ -17,11 +17,11 @@ public interface IDiscoveryResponseGenerator /// The base URL. /// The issuer URI. /// The cancellation token. - Task> CreateDiscoveryDocumentAsync(string baseUrl, string issuerUri, CT ct); + Task> CreateDiscoveryDocumentAsync(string baseUrl, string issuerUri, Ct ct); /// /// Creates the JWK document. /// /// The cancellation token. - Task> CreateJwkDocumentAsync(CT ct); + Task> CreateJwkDocumentAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/IIntrospectionResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IIntrospectionResponseGenerator.cs index 427be2f9e..f9cffbd08 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IIntrospectionResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IIntrospectionResponseGenerator.cs @@ -17,5 +17,5 @@ public interface IIntrospectionResponseGenerator /// The validation result. /// The cancellation token. /// - Task> ProcessAsync(IntrospectionRequestValidationResult validationResult, CT ct); + Task> ProcessAsync(IntrospectionRequestValidationResult validationResult, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/IPushedAuthorizationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IPushedAuthorizationResponseGenerator.cs index 6391267fa..65751683a 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IPushedAuthorizationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IPushedAuthorizationResponseGenerator.cs @@ -21,5 +21,5 @@ public interface IPushedAuthorizationResponseGenerator /// The validated pushed authorization request. /// The cancellation token. /// A task that contains response model indicating either success or failure. - Task CreateResponseAsync(ValidatedPushedAuthorizationRequest request, CT ct); + Task CreateResponseAsync(ValidatedPushedAuthorizationRequest request, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/ITokenResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/ITokenResponseGenerator.cs index 1c43f4dbb..15fe2f92d 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/ITokenResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/ITokenResponseGenerator.cs @@ -19,5 +19,5 @@ public interface ITokenResponseGenerator /// The validation result. /// The cancellation token. /// - Task ProcessAsync(TokenRequestValidationResult validationResult, CT ct); + Task ProcessAsync(TokenRequestValidationResult validationResult, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/ITokenRevocationResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/ITokenRevocationResponseGenerator.cs index 665112fb5..490fbbde4 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/ITokenRevocationResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/ITokenRevocationResponseGenerator.cs @@ -17,5 +17,5 @@ public interface ITokenRevocationResponseGenerator /// The userinfo request validation result. /// The cancellation token. /// - Task ProcessAsync(TokenRevocationRequestValidationResult validationResult, CT ct); + Task ProcessAsync(TokenRevocationRequestValidationResult validationResult, Ct ct); } diff --git a/identity-server/src/IdentityServer/ResponseHandling/IUserInfoResponseGenerator.cs b/identity-server/src/IdentityServer/ResponseHandling/IUserInfoResponseGenerator.cs index a3f46b92c..2fc211b4a 100644 --- a/identity-server/src/IdentityServer/ResponseHandling/IUserInfoResponseGenerator.cs +++ b/identity-server/src/IdentityServer/ResponseHandling/IUserInfoResponseGenerator.cs @@ -17,5 +17,5 @@ public interface IUserInfoResponseGenerator /// The userinfo request validation result. /// The cancellation token. /// - Task> ProcessAsync(UserInfoRequestValidationResult validationResult, CT ct); + Task> ProcessAsync(UserInfoRequestValidationResult validationResult, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/Default/BackChannelLogoutHttpClient.cs b/identity-server/src/IdentityServer/Services/Default/BackChannelLogoutHttpClient.cs index e1586f473..4af02ec07 100644 --- a/identity-server/src/IdentityServer/Services/Default/BackChannelLogoutHttpClient.cs +++ b/identity-server/src/IdentityServer/Services/Default/BackChannelLogoutHttpClient.cs @@ -33,7 +33,7 @@ public class DefaultBackChannelLogoutHttpClient : IBackChannelLogoutHttpClient /// /// The cancellation token. /// - public async Task PostAsync(string url, Dictionary payload, CT ct) + public async Task PostAsync(string url, Dictionary payload, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultBackChannelLogoutHttpClient.Post"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultBackChannelLogoutService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultBackChannelLogoutService.cs index 1e08c1768..2906510cb 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultBackChannelLogoutService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultBackChannelLogoutService.cs @@ -75,7 +75,7 @@ public class DefaultBackChannelLogoutService : IBackChannelLogoutService } /// - public virtual async Task SendLogoutNotificationsAsync(LogoutNotificationContext context, CT ct) + public virtual async Task SendLogoutNotificationsAsync(LogoutNotificationContext context, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultBackChannelLogoutService.SendLogoutNotifications"); @@ -92,7 +92,7 @@ public class DefaultBackChannelLogoutService : IBackChannelLogoutService /// /// The cancellation token. /// - protected virtual async Task SendLogoutNotificationsAsync(IEnumerable requests, CT ct) + protected virtual async Task SendLogoutNotificationsAsync(IEnumerable requests, Ct ct) { requests ??= []; var logoutRequestsWithPayload = new List<(BackChannelLogoutRequest, Dictionary)>(); @@ -118,7 +118,7 @@ public class DefaultBackChannelLogoutService : IBackChannelLogoutService /// /// The cancellation token. /// - protected virtual Task PostLogoutJwt(BackChannelLogoutRequest client, Dictionary data, CT ct) => HttpClient.PostAsync(client.LogoutUri, data, ct); + protected virtual Task PostLogoutJwt(BackChannelLogoutRequest client, Dictionary data, Ct ct) => HttpClient.PostAsync(client.LogoutUri, data, ct); /// /// Creates the form-url-encoded payload (as a dictionary) to send to the client. @@ -126,7 +126,7 @@ public class DefaultBackChannelLogoutService : IBackChannelLogoutService /// /// The cancellation token. /// - protected async Task> CreateFormPostPayloadAsync(BackChannelLogoutRequest request, CT ct) + protected async Task> CreateFormPostPayloadAsync(BackChannelLogoutRequest request, Ct ct) { var token = await CreateTokenAsync(request, ct); @@ -143,7 +143,7 @@ public class DefaultBackChannelLogoutService : IBackChannelLogoutService /// /// The cancellation token. /// The token. - protected virtual async Task CreateTokenAsync(BackChannelLogoutRequest request, CT ct) + protected virtual async Task CreateTokenAsync(BackChannelLogoutRequest request, Ct ct) { var claims = await CreateClaimsForTokenAsync(request); if (claims.Any(x => x.Type == JwtClaimTypes.Nonce)) diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultBackchannelAuthenticationInteractionService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultBackchannelAuthenticationInteractionService.cs index 8fb0ffb86..a5ef7f062 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultBackchannelAuthenticationInteractionService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultBackchannelAuthenticationInteractionService.cs @@ -45,7 +45,7 @@ public class DefaultBackchannelAuthenticationInteractionService : IBackchannelAu _logger = logger; } - private async Task CreateAsync(BackChannelAuthenticationRequest request, CT ct) + private async Task CreateAsync(BackChannelAuthenticationRequest request, Ct ct) { if (request == null) { @@ -79,7 +79,7 @@ public class DefaultBackchannelAuthenticationInteractionService : IBackchannelAu } /// - public async Task GetLoginRequestByInternalIdAsync(string id, CT ct) + public async Task GetLoginRequestByInternalIdAsync(string id, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultBackchannelAuthenticationInteractionService.GetLoginRequestByInternalId"); @@ -88,7 +88,7 @@ public class DefaultBackchannelAuthenticationInteractionService : IBackchannelAu } /// - public async Task> GetPendingLoginRequestsForCurrentUserAsync(CT ct) + public async Task> GetPendingLoginRequestsForCurrentUserAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultBackchannelAuthenticationInteractionService.GetPendingLoginRequestsForCurrentUser"); @@ -117,7 +117,7 @@ public class DefaultBackchannelAuthenticationInteractionService : IBackchannelAu } /// - public async Task CompleteLoginRequestAsync(CompleteBackchannelLoginRequest completionRequest, CT ct) + public async Task CompleteLoginRequestAsync(CompleteBackchannelLoginRequest completionRequest, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultBackchannelAuthenticationInteractionService.CompleteLoginRequest"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultCache.cs b/identity-server/src/IdentityServer/Services/Default/DefaultCache.cs index 043f9f748..2cceecc46 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultCache.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultCache.cs @@ -62,7 +62,7 @@ public class DefaultCache : ICache protected string GetKey(string key) => typeof(T).FullName + KeySeparator + key; /// - public Task GetAsync(string key, CT ct) + public Task GetAsync(string key, Ct ct) { using var activity = Tracing.CacheActivitySource.StartActivity("DefaultCache.Get"); @@ -72,7 +72,7 @@ public class DefaultCache : ICache } /// - public Task SetAsync(string key, T item, TimeSpan expiration, CT ct) + public Task SetAsync(string key, T item, TimeSpan expiration, Ct ct) { using var activity = Tracing.CacheActivitySource.StartActivity("DefaultCache.Set"); @@ -82,7 +82,7 @@ public class DefaultCache : ICache } /// - public Task RemoveAsync(string key, CT ct) + public Task RemoveAsync(string key, Ct ct) { using var activity = Tracing.CacheActivitySource.StartActivity("DefaultCache.Remove"); @@ -92,7 +92,7 @@ public class DefaultCache : ICache } /// - public async Task GetOrAddAsync(string key, TimeSpan duration, Func> get, CT ct) + public async Task GetOrAddAsync(string key, TimeSpan duration, Func> get, Ct ct) { using var activity = Tracing.CacheActivitySource.StartActivity("DefaultCache.GetOrAdd"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultClaimsService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultClaimsService.cs index 4712ac4cc..c19f45fd1 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultClaimsService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultClaimsService.cs @@ -39,7 +39,7 @@ public class DefaultClaimsService : IClaimsService } /// - public virtual async Task> GetIdentityTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, bool includeAllIdentityClaims, ValidatedRequest request, CT ct) + public virtual async Task> GetIdentityTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, bool includeAllIdentityClaims, ValidatedRequest request, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultClaimsService.GetIdentityTokenClaims"); @@ -93,7 +93,7 @@ public class DefaultClaimsService : IClaimsService } /// - public virtual async Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resourceResult, ValidatedRequest request, CT ct) + public virtual async Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resourceResult, ValidatedRequest request, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultClaimsService.GetAccessTokenClaims"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultConsentService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultConsentService.cs index c095733a5..5f0b2f5e4 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultConsentService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultConsentService.cs @@ -60,7 +60,7 @@ public class DefaultConsentService : IConsentService /// or /// subject /// - public virtual async Task RequiresConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, CT ct) + public virtual async Task RequiresConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultConsentService.RequiresConsent"); @@ -151,7 +151,7 @@ public class DefaultConsentService : IConsentService /// or /// subject /// - public virtual async Task UpdateConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, CT ct) + public virtual async Task UpdateConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultConsentService.UpdateConsent"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultCorsPolicyService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultCorsPolicyService.cs index 71bb51296..6d0cf8206 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultCorsPolicyService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultCorsPolicyService.cs @@ -42,7 +42,7 @@ public class DefaultCorsPolicyService : ICorsPolicyService public bool AllowAll { get; set; } /// - public virtual Task IsOriginAllowedAsync(string origin, CT ct) + public virtual Task IsOriginAllowedAsync(string origin, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultCorsPolicyService.IsOriginAllowed"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowCodeService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowCodeService.cs index 3ab996c91..5e62e4509 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowCodeService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowCodeService.cs @@ -29,7 +29,7 @@ public class DefaultDeviceFlowCodeService : IDeviceFlowCodeService } /// - public async Task StoreDeviceAuthorizationAsync(string userCode, DeviceCode data, CT ct) + public async Task StoreDeviceAuthorizationAsync(string userCode, DeviceCode data, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultDeviceFlowCodeService.SendLogoutNotifStoreDeviceAuthorization"); @@ -41,7 +41,7 @@ public class DefaultDeviceFlowCodeService : IDeviceFlowCodeService } /// - public Task FindByUserCodeAsync(string userCode, CT ct) + public Task FindByUserCodeAsync(string userCode, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultDeviceFlowCodeService.FindByUserCode"); @@ -49,7 +49,7 @@ public class DefaultDeviceFlowCodeService : IDeviceFlowCodeService } /// - public Task FindByDeviceCodeAsync(string deviceCode, CT ct) + public Task FindByDeviceCodeAsync(string deviceCode, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultDeviceFlowCodeService.FindByDeviceCode"); @@ -57,7 +57,7 @@ public class DefaultDeviceFlowCodeService : IDeviceFlowCodeService } /// - public Task UpdateByUserCodeAsync(string userCode, DeviceCode data, CT ct) + public Task UpdateByUserCodeAsync(string userCode, DeviceCode data, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultDeviceFlowCodeService.UpdateByUserCode"); @@ -65,7 +65,7 @@ public class DefaultDeviceFlowCodeService : IDeviceFlowCodeService } /// - public Task RemoveByDeviceCodeAsync(string deviceCode, CT ct) + public Task RemoveByDeviceCodeAsync(string deviceCode, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultDeviceFlowCodeService.RemoveByDeviceCode"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowInteractionService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowInteractionService.cs index d66032309..995316899 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowInteractionService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultDeviceFlowInteractionService.cs @@ -31,7 +31,7 @@ internal class DefaultDeviceFlowInteractionService : IDeviceFlowInteractionServi _logger = logger; } - public async Task GetAuthorizationContextAsync(string userCode, CT ct) + public async Task GetAuthorizationContextAsync(string userCode, Ct ct) { var deviceAuth = await _devices.FindByUserCodeAsync(userCode, ct); if (deviceAuth == null) @@ -58,7 +58,7 @@ internal class DefaultDeviceFlowInteractionService : IDeviceFlowInteractionServi }; } - public async Task HandleRequestAsync(string userCode, ConsentResponse consent, CT ct) + public async Task HandleRequestAsync(string userCode, ConsentResponse consent, Ct ct) { ArgumentNullException.ThrowIfNull(userCode); ArgumentNullException.ThrowIfNull(consent); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultEventService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultEventService.cs index 373d9a25c..7b3e74a5e 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultEventService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultEventService.cs @@ -51,7 +51,7 @@ public class DefaultEventService : IEventService } /// - public async Task RaiseAsync(Event evt, CT ct) + public async Task RaiseAsync(Event evt, Ct ct) { ArgumentNullException.ThrowIfNull(evt); @@ -93,7 +93,7 @@ public class DefaultEventService : IEventService /// The evt. /// The cancellation token. /// - protected virtual async Task PrepareEventAsync(Event evt, CT ct) + protected virtual async Task PrepareEventAsync(Event evt, Ct ct) { evt.TimeStamp = TimeProvider.GetUtcNow().DateTime; using var process = Process.GetCurrentProcess(); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultEventSink.cs b/identity-server/src/IdentityServer/Services/Default/DefaultEventSink.cs index aa4c20304..72f2c3a09 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultEventSink.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultEventSink.cs @@ -24,7 +24,7 @@ public class DefaultEventSink : IEventSink public DefaultEventSink(ILogger logger) => _logger = logger; /// - public virtual Task PersistAsync(Event evt, CT ct) + public virtual Task PersistAsync(Event evt, Ct ct) { ArgumentNullException.ThrowIfNull(evt); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultHandleGenerationService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultHandleGenerationService.cs index 17b8308b9..79fb0af84 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultHandleGenerationService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultHandleGenerationService.cs @@ -13,5 +13,5 @@ namespace Duende.IdentityServer.Services; public class DefaultHandleGenerationService : IHandleGenerationService { /// - public Task GenerateAsync(CT ct, int length = 32) => Task.FromResult(CryptoRandom.CreateUniqueId(length, CryptoRandom.OutputFormat.Hex)); + public Task GenerateAsync(Ct ct, int length = 32) => Task.FromResult(CryptoRandom.CreateUniqueId(length, CryptoRandom.OutputFormat.Hex)); } diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultIdentityServerInteractionService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultIdentityServerInteractionService.cs index 866b2e5e6..ccea3bdc2 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultIdentityServerInteractionService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultIdentityServerInteractionService.cs @@ -45,7 +45,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task GetAuthorizationContextAsync(string returnUrl, CT ct) + public async Task GetAuthorizationContextAsync(string returnUrl, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.GetAuthorizationContext"); @@ -64,7 +64,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task GetLogoutContextAsync(string logoutId, CT ct) + public async Task GetLogoutContextAsync(string logoutId, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.GetLogoutContext"); @@ -74,7 +74,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task CreateLogoutContextAsync(CT ct) + public async Task CreateLogoutContextAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.CreateLogoutContext"); @@ -100,7 +100,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task GetErrorContextAsync(string errorId, CT ct) + public async Task GetErrorContextAsync(string errorId, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.GetErrorContext"); @@ -125,7 +125,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task GrantConsentAsync(AuthorizationRequest request, ConsentResponse consent, CT ct, string subject = null) + public async Task GrantConsentAsync(AuthorizationRequest request, ConsentResponse consent, Ct ct, string subject = null) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.GrantConsent"); @@ -145,7 +145,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public Task DenyAuthorizationAsync(AuthorizationRequest request, AuthorizationError error, CT ct, string errorDescription = null) + public Task DenyAuthorizationAsync(AuthorizationRequest request, AuthorizationError error, Ct ct, string errorDescription = null) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.DenyAuthorization"); @@ -176,7 +176,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task> GetAllUserGrantsAsync(CT ct) + public async Task> GetAllUserGrantsAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.GetAllUserGrants"); @@ -191,7 +191,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task RevokeUserConsentAsync(string clientId, CT ct) + public async Task RevokeUserConsentAsync(string clientId, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.RevokeUserConsent"); @@ -204,7 +204,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract } /// - public async Task RevokeTokensForCurrentSessionAsync(CT ct) + public async Task RevokeTokensForCurrentSessionAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultIdentityServerInteractionService.RevokeTokensForCurrentSession"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultIssuerNameService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultIssuerNameService.cs index 7b2be4b99..c5387c05e 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultIssuerNameService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultIssuerNameService.cs @@ -31,7 +31,7 @@ public class DefaultIssuerNameService : IIssuerNameService } /// - public Task GetCurrentAsync(CT ct) + public Task GetCurrentAsync(Ct ct) { // if they've explicitly configured a URI then use it, // otherwise dynamically calculate it diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultJwtRequestUriHttpClient.cs b/identity-server/src/IdentityServer/Services/Default/DefaultJwtRequestUriHttpClient.cs index 22afcda09..a7ce1d534 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultJwtRequestUriHttpClient.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultJwtRequestUriHttpClient.cs @@ -35,7 +35,7 @@ public class DefaultJwtRequestUriHttpClient : IJwtRequestUriHttpClient /// - public async Task GetJwtAsync(string url, Client client, CT ct) + public async Task GetJwtAsync(string url, Client client, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultJwtRequestUriHttpClient.GetJwt"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultKeyMaterialService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultKeyMaterialService.cs index 903004cd4..fd09251fa 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultKeyMaterialService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultKeyMaterialService.cs @@ -37,7 +37,7 @@ public class DefaultKeyMaterialService : IKeyMaterialService } /// - public async Task GetSigningCredentialsAsync(IEnumerable allowedAlgorithms, CT ct) + public async Task GetSigningCredentialsAsync(IEnumerable allowedAlgorithms, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultKeyMaterialService.GetSigningCredentials"); @@ -74,7 +74,7 @@ public class DefaultKeyMaterialService : IKeyMaterialService } /// - public async Task> GetAllSigningCredentialsAsync(CT ct) + public async Task> GetAllSigningCredentialsAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultKeyMaterialService.GetAllSigningCredentials"); @@ -99,7 +99,7 @@ public class DefaultKeyMaterialService : IKeyMaterialService } /// - public async Task> GetValidationKeysAsync(CT ct) + public async Task> GetValidationKeysAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultKeyMaterialService.GetValidationKeys"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs index 28b0a47a6..8e8e203f9 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs @@ -34,7 +34,7 @@ public class DefaultPersistedGrantService : IPersistedGrantService } /// - public async Task> GetAllGrantsAsync(string subjectId, CT ct) + public async Task> GetAllGrantsAsync(string subjectId, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultPersistedGrantService.GetAllGrants"); @@ -171,7 +171,7 @@ public class DefaultPersistedGrantService : IPersistedGrantService } /// - public Task RemoveAllGrantsAsync(string subjectId, CT ct, string clientId = null, string sessionId = null) + public Task RemoveAllGrantsAsync(string subjectId, Ct ct, string clientId = null, string sessionId = null) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultPersistedGrantService.RemoveAllGrants"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultProfileService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultProfileService.cs index c75bb6084..f179945c7 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultProfileService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultProfileService.cs @@ -31,7 +31,7 @@ public class DefaultProfileService : IProfileService /// The context. /// The cancellation token. /// - public virtual Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) + public virtual Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultProfileService.GetProfileData"); @@ -49,7 +49,7 @@ public class DefaultProfileService : IProfileService /// The context. /// The cancellation token. /// - public virtual Task IsActiveAsync(IsActiveContext context, CT ct) + public virtual Task IsActiveAsync(IsActiveContext context, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultProfileService.IsActive"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultRefreshTokenService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultRefreshTokenService.cs index 06b725907..2c06c5df9 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultRefreshTokenService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultRefreshTokenService.cs @@ -67,7 +67,7 @@ public class DefaultRefreshTokenService : IRefreshTokenService } /// - public virtual async Task ValidateRefreshTokenAsync(string tokenHandle, Client client, CT ct) + public virtual async Task ValidateRefreshTokenAsync(string tokenHandle, Client client, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultRefreshTokenService.ValidateRefreshToken"); @@ -169,7 +169,7 @@ public class DefaultRefreshTokenService : IRefreshTokenService /// /// The refresh token handle /// - public virtual async Task CreateRefreshTokenAsync(RefreshTokenCreationRequest request, CT ct) + public virtual async Task CreateRefreshTokenAsync(RefreshTokenCreationRequest request, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultRefreshTokenService.CreateRefreshToken"); @@ -223,7 +223,7 @@ public class DefaultRefreshTokenService : IRefreshTokenService /// /// The refresh token handle /// - public virtual async Task UpdateRefreshTokenAsync(RefreshTokenUpdateRequest request, CT ct) + public virtual async Task UpdateRefreshTokenAsync(RefreshTokenUpdateRequest request, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultTokenCreationService.UpdateRefreshToken"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultReplayCache.cs b/identity-server/src/IdentityServer/Services/Default/DefaultReplayCache.cs index c62429be4..8d44a49ca 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultReplayCache.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultReplayCache.cs @@ -22,7 +22,7 @@ public class DefaultReplayCache : IReplayCache public DefaultReplayCache(IDistributedCache cache) => _cache = cache; /// - public async Task AddAsync(string purpose, string handle, DateTimeOffset expiration, CT ct) + public async Task AddAsync(string purpose, string handle, DateTimeOffset expiration, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultReplayCache.Add"); @@ -35,7 +35,7 @@ public class DefaultReplayCache : IReplayCache } /// - public async Task ExistsAsync(string purpose, string handle, CT ct) + public async Task ExistsAsync(string purpose, string handle, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultReplayCache.Exists"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultSessionCoordinationService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultSessionCoordinationService.cs index e8fbb80cf..21f7409f5 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultSessionCoordinationService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultSessionCoordinationService.cs @@ -81,7 +81,7 @@ public class DefaultSessionCoordinationService : ISessionCoordinationService }; /// - public virtual async Task ProcessLogoutAsync(UserSession session, CT ct) + public virtual async Task ProcessLogoutAsync(UserSession session, Ct ct) { if (session.ClientIds.Count > 0) { @@ -132,7 +132,7 @@ public class DefaultSessionCoordinationService : ISessionCoordinationService /// - public virtual async Task ProcessExpirationAsync(UserSession session, CT ct) + public virtual async Task ProcessExpirationAsync(UserSession session, Ct ct) { var clientsToCoordinate = new List(); @@ -194,7 +194,7 @@ public class DefaultSessionCoordinationService : ISessionCoordinationService /// - public virtual async Task ValidateSessionAsync(SessionValidationRequest request, CT ct) + public virtual async Task ValidateSessionAsync(SessionValidationRequest request, Ct ct) { if (ServerSideSessionStore != null) { @@ -238,7 +238,7 @@ public class DefaultSessionCoordinationService : ISessionCoordinationService //result in the cookie never being renewed and expiring in a surprising way. Renewing //the ticket also updates the session, so we don't need to do both. if (Options.Authentication.CookieSlidingExpiration && -#pragma warning disable CA2016 // ITicketStore interface has no CT parameter +#pragma warning disable CA2016 // ITicketStore interface has no Ct parameter await ServerSideTicketStore.RetrieveAsync(session.Key) is { Properties: { IsPersistent: true, AllowRefresh: null or true } } ticket) { diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultSessionManagementService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultSessionManagementService.cs index 37cba7966..d7ac96fe7 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultSessionManagementService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultSessionManagementService.cs @@ -33,7 +33,7 @@ public class DefaultSessionManagementService : ISessionManagementService } /// - public Task> QuerySessionsAsync(SessionQuery filter, CT ct) + public Task> QuerySessionsAsync(SessionQuery filter, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultSessionManagementService.QuerySessions"); @@ -48,7 +48,7 @@ public class DefaultSessionManagementService : ISessionManagementService }; /// - public async Task RemoveSessionsAsync(RemoveSessionsContext context, CT ct) + public async Task RemoveSessionsAsync(RemoveSessionsContext context, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultSessionManagementService.RemoveSessions"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultTokenCreationService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultTokenCreationService.cs index ef810e923..f5756434e 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultTokenCreationService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultTokenCreationService.cs @@ -57,7 +57,7 @@ public class DefaultTokenCreationService : ITokenCreationService } /// - public virtual async Task CreateTokenAsync(Token token, CT ct) + public virtual async Task CreateTokenAsync(Token token, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultTokenCreationService.CreateToken"); @@ -119,7 +119,7 @@ public class DefaultTokenCreationService : ITokenCreationService /// /// protected virtual async Task CreateJwtAsync(Token token, string payload, - Dictionary headerElements, CT ct) + Dictionary headerElements, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultTokenCreationService.CreateJwt"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultTokenService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultTokenService.cs index f193ac8ad..1a56f2e36 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultTokenService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultTokenService.cs @@ -82,7 +82,7 @@ public class DefaultTokenService : ITokenService } /// - public virtual async Task CreateIdentityTokenAsync(TokenCreationRequest request, CT ct) + public virtual async Task CreateIdentityTokenAsync(TokenCreationRequest request, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultTokenService.CreateIdentityToken"); @@ -155,7 +155,7 @@ public class DefaultTokenService : ITokenService } /// - public virtual async Task CreateAccessTokenAsync(TokenCreationRequest request, CT ct) + public virtual async Task CreateAccessTokenAsync(TokenCreationRequest request, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultTokenService.CreateAccessToken"); @@ -211,7 +211,7 @@ public class DefaultTokenService : ITokenService } /// - public virtual async Task CreateSecurityTokenAsync(Token token, CT ct) + public virtual async Task CreateSecurityTokenAsync(Token token, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DefaultTokenService.CreateSecurityToken"); diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultUiLocalesService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultUiLocalesService.cs index d10654053..d6d50d89c 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultUiLocalesService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultUiLocalesService.cs @@ -13,7 +13,7 @@ namespace Duende.IdentityServer.Services.Default; public class DefaultUiLocalesService(IHttpContextAccessor httpContextAccessor, IOptions requestLocalizationOptions, ILogger logger) : IUiLocalesService { - public virtual Task StoreUiLocalesForRedirectAsync(string? uiLocales, CT ct) + public virtual Task StoreUiLocalesForRedirectAsync(string? uiLocales, Ct ct) { if (httpContextAccessor.HttpContext is null) { diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultUserCodeService.cs b/identity-server/src/IdentityServer/Services/Default/DefaultUserCodeService.cs index 1771a398a..a906b02ff 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultUserCodeService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultUserCodeService.cs @@ -25,6 +25,6 @@ public class DefaultUserCodeService : IUserCodeService /// Type of user code. /// The cancellation token. /// - public Task GetGenerator(string userCodeType, CT ct) => + public Task GetGenerator(string userCodeType, Ct ct) => Task.FromResult(_generators.FirstOrDefault(x => x.UserCodeType == userCodeType)); } diff --git a/identity-server/src/IdentityServer/Services/Default/DefaultUserSession.cs b/identity-server/src/IdentityServer/Services/Default/DefaultUserSession.cs index a75f1d076..e57e1b81a 100644 --- a/identity-server/src/IdentityServer/Services/Default/DefaultUserSession.cs +++ b/identity-server/src/IdentityServer/Services/Default/DefaultUserSession.cs @@ -161,7 +161,7 @@ public class DefaultUserSession : IUserSession /// or /// properties /// - public virtual async Task CreateSessionIdAsync(ClaimsPrincipal principal, AuthenticationProperties properties, CT ct) + public virtual async Task CreateSessionIdAsync(ClaimsPrincipal principal, AuthenticationProperties properties, Ct ct) { ArgumentNullException.ThrowIfNull(principal); ArgumentNullException.ThrowIfNull(properties); @@ -201,7 +201,7 @@ public class DefaultUserSession : IUserSession /// /// The cancellation token. /// - public virtual async Task GetUserAsync(CT ct) + public virtual async Task GetUserAsync(Ct ct) { await AuthenticateAsync(); @@ -213,7 +213,7 @@ public class DefaultUserSession : IUserSession /// /// The cancellation token. /// - public virtual async Task GetSessionIdAsync(CT ct) + public virtual async Task GetSessionIdAsync(Ct ct) { await AuthenticateAsync(); @@ -227,7 +227,7 @@ public class DefaultUserSession : IUserSession /// /// The cancellation token. /// - public virtual async Task EnsureSessionIdCookieAsync(CT ct) + public virtual async Task EnsureSessionIdCookieAsync(Ct ct) { var sid = await GetSessionIdAsync(ct); if (sid != null) @@ -245,7 +245,7 @@ public class DefaultUserSession : IUserSession /// /// The cancellation token. /// - public virtual Task RemoveSessionIdCookieAsync(CT ct) + public virtual Task RemoveSessionIdCookieAsync(Ct ct) { if (HttpContext.Request.Cookies.ContainsKey(CheckSessionCookieName)) { @@ -305,7 +305,7 @@ public class DefaultUserSession : IUserSession /// The cancellation token. /// /// clientId - public virtual async Task AddClientIdAsync(string clientId, CT ct) + public virtual async Task AddClientIdAsync(string clientId, Ct ct) { ArgumentNullException.ThrowIfNull(clientId); @@ -326,7 +326,7 @@ public class DefaultUserSession : IUserSession /// /// The cancellation token. /// - public virtual async Task> GetClientListAsync(CT ct) + public virtual async Task> GetClientListAsync(Ct ct) { await AuthenticateAsync(); diff --git a/identity-server/src/IdentityServer/Services/Default/DistributedBackchannelAuthenticationThrottlingService.cs b/identity-server/src/IdentityServer/Services/Default/DistributedBackchannelAuthenticationThrottlingService.cs index 2b1f26b06..59c272824 100644 --- a/identity-server/src/IdentityServer/Services/Default/DistributedBackchannelAuthenticationThrottlingService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DistributedBackchannelAuthenticationThrottlingService.cs @@ -37,7 +37,7 @@ public class DistributedBackchannelAuthenticationThrottlingService : IBackchanne } /// - public async Task ShouldSlowDown(string requestId, BackChannelAuthenticationRequest details, CT ct) + public async Task ShouldSlowDown(string requestId, BackChannelAuthenticationRequest details, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DistributedBackchannelAuthenticationThrottlingService.ShouldSlowDown"); diff --git a/identity-server/src/IdentityServer/Services/Default/DistributedDeviceFlowThrottlingService.cs b/identity-server/src/IdentityServer/Services/Default/DistributedDeviceFlowThrottlingService.cs index 3e5ccf1cb..310654e22 100644 --- a/identity-server/src/IdentityServer/Services/Default/DistributedDeviceFlowThrottlingService.cs +++ b/identity-server/src/IdentityServer/Services/Default/DistributedDeviceFlowThrottlingService.cs @@ -49,7 +49,7 @@ public class DistributedDeviceFlowThrottlingService : IDeviceFlowThrottlingServi /// The cancellation token. /// /// deviceCode - public async Task ShouldSlowDown(string deviceCode, DeviceCode details, CT ct) + public async Task ShouldSlowDown(string deviceCode, DeviceCode details, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("DistributedDeviceFlowThrottlingService.ShouldSlowDown"); diff --git a/identity-server/src/IdentityServer/Services/Default/KeyManagement/AutomaticKeyManagerKeyStore.cs b/identity-server/src/IdentityServer/Services/Default/KeyManagement/AutomaticKeyManagerKeyStore.cs index 99c0edeee..955a7ccf4 100644 --- a/identity-server/src/IdentityServer/Services/Default/KeyManagement/AutomaticKeyManagerKeyStore.cs +++ b/identity-server/src/IdentityServer/Services/Default/KeyManagement/AutomaticKeyManagerKeyStore.cs @@ -19,7 +19,7 @@ public interface IAutomaticKeyManagerKeyStore : IValidationKeysStore, ISigningCr /// /// The cancellation token. /// - Task> GetAllSigningCredentialsAsync(CT ct); + Task> GetAllSigningCredentialsAsync(Ct ct); } /// @@ -28,13 +28,13 @@ public interface IAutomaticKeyManagerKeyStore : IValidationKeysStore, ISigningCr internal class NopAutomaticKeyManagerKeyStore : IAutomaticKeyManagerKeyStore { /// - public Task GetSigningCredentialsAsync(CT ct) => Task.FromResult(null); + public Task GetSigningCredentialsAsync(Ct ct) => Task.FromResult(null); /// - public Task> GetAllSigningCredentialsAsync(CT ct) => Task.FromResult(Enumerable.Empty()); + public Task> GetAllSigningCredentialsAsync(Ct ct) => Task.FromResult(Enumerable.Empty()); /// - public Task> GetValidationKeysAsync(CT ct) => Task.FromResult(Enumerable.Empty()); + public Task> GetValidationKeysAsync(Ct ct) => Task.FromResult(Enumerable.Empty()); } /// @@ -57,7 +57,7 @@ public class AutomaticKeyManagerKeyStore : IAutomaticKeyManagerKeyStore } /// - public async Task GetSigningCredentialsAsync(CT ct) + public async Task GetSigningCredentialsAsync(Ct ct) { if (!_options.Enabled) { @@ -71,7 +71,7 @@ public class AutomaticKeyManagerKeyStore : IAutomaticKeyManagerKeyStore } /// - public async Task> GetAllSigningCredentialsAsync(CT ct) + public async Task> GetAllSigningCredentialsAsync(Ct ct) { if (!_options.Enabled) { @@ -84,7 +84,7 @@ public class AutomaticKeyManagerKeyStore : IAutomaticKeyManagerKeyStore } /// - public async Task> GetValidationKeysAsync(CT ct) + public async Task> GetValidationKeysAsync(Ct ct) { if (!_options.Enabled) { diff --git a/identity-server/src/IdentityServer/Services/Default/KeyManagement/FileSystemKeyStore.cs b/identity-server/src/IdentityServer/Services/Default/KeyManagement/FileSystemKeyStore.cs index 09ab5dc4b..506fad503 100644 --- a/identity-server/src/IdentityServer/Services/Default/KeyManagement/FileSystemKeyStore.cs +++ b/identity-server/src/IdentityServer/Services/Default/KeyManagement/FileSystemKeyStore.cs @@ -46,7 +46,7 @@ public class FileSystemKeyStore : ISigningKeyStore /// /// The cancellation token. /// - public async Task> LoadKeysAsync(CT ct) + public async Task> LoadKeysAsync(Ct ct) { var list = new List(); @@ -83,7 +83,7 @@ public class FileSystemKeyStore : ISigningKeyStore /// /// The cancellation token. /// - public async Task StoreKeyAsync(SerializedKey key, CT ct) + public async Task StoreKeyAsync(SerializedKey key, Ct ct) { if (!_directory.Exists) { @@ -102,7 +102,7 @@ public class FileSystemKeyStore : ISigningKeyStore /// /// The cancellation token. /// - public Task DeleteKeyAsync(string id, CT ct) + public Task DeleteKeyAsync(string id, Ct ct) { var path = Path.Combine(_directory.FullName, KeyFilePrefix + id + KeyFileExtension); try diff --git a/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyManager.cs b/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyManager.cs index 7b4ddc8fc..787da7dd2 100644 --- a/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyManager.cs +++ b/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyManager.cs @@ -14,12 +14,12 @@ public interface IKeyManager /// /// The cancellation token. /// - Task> GetCurrentKeysAsync(CT ct); + Task> GetCurrentKeysAsync(Ct ct); /// /// Returns all the validation keys. /// /// The cancellation token. /// - Task> GetAllKeysAsync(CT ct); + Task> GetAllKeysAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyStoreCache.cs b/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyStoreCache.cs index daf5db0eb..60b561c1b 100644 --- a/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyStoreCache.cs +++ b/identity-server/src/IdentityServer/Services/Default/KeyManagement/IKeyStoreCache.cs @@ -14,7 +14,7 @@ public interface ISigningKeyStoreCache /// /// The cancellation token. /// - Task> GetKeysAsync(CT ct); + Task> GetKeysAsync(Ct ct); /// /// Caches keys for duration. @@ -23,5 +23,5 @@ public interface ISigningKeyStoreCache /// /// The cancellation token. /// - Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, CT ct); + Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/Default/KeyManagement/InMemoryKeyStoreCache.cs b/identity-server/src/IdentityServer/Services/Default/KeyManagement/InMemoryKeyStoreCache.cs index c1699b14d..42c24f9e7 100644 --- a/identity-server/src/IdentityServer/Services/Default/KeyManagement/InMemoryKeyStoreCache.cs +++ b/identity-server/src/IdentityServer/Services/Default/KeyManagement/InMemoryKeyStoreCache.cs @@ -26,7 +26,7 @@ internal class InMemoryKeyStoreCache : ISigningKeyStoreCache /// Returns cached keys. /// /// - public Task> GetKeysAsync(CT ct) + public Task> GetKeysAsync(Ct ct) { DateTime expires; IEnumerable keys; @@ -52,7 +52,7 @@ internal class InMemoryKeyStoreCache : ISigningKeyStoreCache /// /// The cancellation token. /// - public Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, CT ct) + public Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, Ct ct) { lock (_lock) { diff --git a/identity-server/src/IdentityServer/Services/Default/KeyManagement/KeyManager.cs b/identity-server/src/IdentityServer/Services/Default/KeyManagement/KeyManager.cs index 4a135e321..60e40efdd 100644 --- a/identity-server/src/IdentityServer/Services/Default/KeyManagement/KeyManager.cs +++ b/identity-server/src/IdentityServer/Services/Default/KeyManagement/KeyManager.cs @@ -60,7 +60,7 @@ public class KeyManager : IKeyManager } /// - public async Task> GetCurrentKeysAsync(CT ct) + public async Task> GetCurrentKeysAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("KeyManager.GetCurrentKeys"); @@ -83,7 +83,7 @@ public class KeyManager : IKeyManager } /// - public async Task> GetAllKeysAsync(CT ct) + public async Task> GetAllKeysAsync(Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("KeyManager.GetAllKeys"); @@ -95,7 +95,7 @@ public class KeyManager : IKeyManager - internal async Task<(IEnumerable allKeys, IEnumerable signingKeys)> GetAllKeysInternalAsync(CT ct) + internal async Task<(IEnumerable allKeys, IEnumerable signingKeys)> GetAllKeysInternalAsync(Ct ct) { var cached = true; var keys = await GetAllKeysFromCacheAsync(ct); @@ -265,7 +265,7 @@ public class KeyManager : IKeyManager return false; } - internal async Task CreateAndStoreNewKeyAsync(SigningAlgorithmOptions alg, CT ct) + internal async Task CreateAndStoreNewKeyAsync(SigningAlgorithmOptions alg, Ct ct) { _logger.LogTrace("Creating new key."); @@ -307,7 +307,7 @@ public class KeyManager : IKeyManager return container; } - internal async Task> GetAllKeysFromCacheAsync(CT ct) + internal async Task> GetAllKeysFromCacheAsync(Ct ct) { var cachedKeys = await _cache.GetKeysAsync(ct); if (cachedKeys != null) @@ -340,7 +340,7 @@ public class KeyManager : IKeyManager return result; } - internal async Task> FilterAndDeleteRetiredKeysAsync(IEnumerable keys, CT ct) + internal async Task> FilterAndDeleteRetiredKeysAsync(IEnumerable keys, Ct ct) { var retired = keys .Where(x => @@ -373,7 +373,7 @@ public class KeyManager : IKeyManager return result; } - internal async Task DeleteKeysAsync(IEnumerable keys, CT ct) + internal async Task DeleteKeysAsync(IEnumerable keys, Ct ct) { if (keys == null || !keys.Any()) { @@ -399,7 +399,7 @@ public class KeyManager : IKeyManager return result; } - internal async Task CacheKeysAsync(IEnumerable keys, CT ct) + internal async Task CacheKeysAsync(IEnumerable keys, Ct ct) { if (keys?.Any() == true) { @@ -428,7 +428,7 @@ public class KeyManager : IKeyManager } } - internal async Task> GetAllKeysFromStoreAsync(CT ct, bool cache = true) + internal async Task> GetAllKeysFromStoreAsync(Ct ct, bool cache = true) { _logger.LogTrace("Loading keys from store."); @@ -505,7 +505,7 @@ public class KeyManager : IKeyManager - internal async Task<(IEnumerable allKeys, IEnumerable activeKeys)> CreateNewKeysAndAddToCacheAsync(CT ct) + internal async Task<(IEnumerable allKeys, IEnumerable activeKeys)> CreateNewKeysAndAddToCacheAsync(Ct ct) { var keys = new List(); keys.AddRange(await _cache.GetKeysAsync(ct) ?? Enumerable.Empty()); diff --git a/identity-server/src/IdentityServer/Services/Default/KeyManagement/NopKeyStoreCache.cs b/identity-server/src/IdentityServer/Services/Default/KeyManagement/NopKeyStoreCache.cs index c33dd255f..bde7ca0d7 100644 --- a/identity-server/src/IdentityServer/Services/Default/KeyManagement/NopKeyStoreCache.cs +++ b/identity-server/src/IdentityServer/Services/Default/KeyManagement/NopKeyStoreCache.cs @@ -13,7 +13,7 @@ internal class NopKeyStoreCache : ISigningKeyStoreCache /// Returns null. /// /// - public Task> GetKeysAsync(CT ct) => Task.FromResult>(null); + public Task> GetKeysAsync(Ct ct) => Task.FromResult>(null); /// /// Does not cache keys. @@ -22,5 +22,5 @@ internal class NopKeyStoreCache : ISigningKeyStoreCache /// /// The cancellation token. /// - public Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, CT ct) => Task.CompletedTask; + public Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, Ct ct) => Task.CompletedTask; } diff --git a/identity-server/src/IdentityServer/Services/Default/LogoutNotificationService.cs b/identity-server/src/IdentityServer/Services/Default/LogoutNotificationService.cs index c90c17a26..7523fd34c 100644 --- a/identity-server/src/IdentityServer/Services/Default/LogoutNotificationService.cs +++ b/identity-server/src/IdentityServer/Services/Default/LogoutNotificationService.cs @@ -35,7 +35,7 @@ public class LogoutNotificationService : ILogoutNotificationService } /// - public async Task> GetFrontChannelLogoutNotificationsUrlsAsync(LogoutNotificationContext context, CT ct) + public async Task> GetFrontChannelLogoutNotificationsUrlsAsync(LogoutNotificationContext context, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("LogoutNotificationService.GetFrontChannelLogoutNotificationsUrls"); @@ -82,7 +82,7 @@ public class LogoutNotificationService : ILogoutNotificationService } /// - public async Task> GetBackChannelLogoutNotificationsAsync(LogoutNotificationContext context, CT ct) + public async Task> GetBackChannelLogoutNotificationsAsync(LogoutNotificationContext context, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("LogoutNotificationService.GetBackChannelLogoutNotifications"); diff --git a/identity-server/src/IdentityServer/Services/Default/NopBackchannelAuthenticationUserNotificationService.cs b/identity-server/src/IdentityServer/Services/Default/NopBackchannelAuthenticationUserNotificationService.cs index 2f804645b..cb8154778 100644 --- a/identity-server/src/IdentityServer/Services/Default/NopBackchannelAuthenticationUserNotificationService.cs +++ b/identity-server/src/IdentityServer/Services/Default/NopBackchannelAuthenticationUserNotificationService.cs @@ -26,7 +26,7 @@ public class NopBackchannelAuthenticationUserNotificationService : IBackchannelA } /// - public async Task SendLoginRequestAsync(BackchannelUserLoginRequest request, CT ct) + public async Task SendLoginRequestAsync(BackchannelUserLoginRequest request, Ct ct) { var url = await _issuerNameService.GetCurrentAsync(ct); url += "/ciba?id=" + request.InternalId; diff --git a/identity-server/src/IdentityServer/Services/Default/NumericUserCodeGenerator.cs b/identity-server/src/IdentityServer/Services/Default/NumericUserCodeGenerator.cs index e06ccf440..964368e35 100644 --- a/identity-server/src/IdentityServer/Services/Default/NumericUserCodeGenerator.cs +++ b/identity-server/src/IdentityServer/Services/Default/NumericUserCodeGenerator.cs @@ -34,7 +34,7 @@ public class NumericUserCodeGenerator : IUserCodeGenerator /// /// The cancellation token. /// - public Task GenerateAsync(CT ct) + public Task GenerateAsync(Ct ct) { var next = RandomNumberGenerator.GetInt32(100000000, 1000000000); return Task.FromResult(next.ToString(CultureInfo.InvariantCulture)); diff --git a/identity-server/src/IdentityServer/Services/Default/OidcReturnUrlParser.cs b/identity-server/src/IdentityServer/Services/Default/OidcReturnUrlParser.cs index e1b186f3e..36c20d28a 100644 --- a/identity-server/src/IdentityServer/Services/Default/OidcReturnUrlParser.cs +++ b/identity-server/src/IdentityServer/Services/Default/OidcReturnUrlParser.cs @@ -38,7 +38,7 @@ internal class OidcReturnUrlParser : IReturnUrlParser _authorizationParametersMessageStore = authorizationParametersMessageStore; } - public async Task ParseAsync(string returnUrl, CT ct) + public async Task ParseAsync(string returnUrl, Ct ct) { using var activity = Tracing.ValidationActivitySource.StartActivity("OidcReturnUrlParser.Parse"); diff --git a/identity-server/src/IdentityServer/Services/Default/PushedAuthorizationService.cs b/identity-server/src/IdentityServer/Services/Default/PushedAuthorizationService.cs index b9bb02146..3b806deb7 100644 --- a/identity-server/src/IdentityServer/Services/Default/PushedAuthorizationService.cs +++ b/identity-server/src/IdentityServer/Services/Default/PushedAuthorizationService.cs @@ -29,10 +29,10 @@ public class PushedAuthorizationService : IPushedAuthorizationService } /// - public Task ConsumeAsync(string referenceValue, CT ct) => _store.ConsumeByHashAsync(referenceValue.ToSha256(), ct); + public Task ConsumeAsync(string referenceValue, Ct ct) => _store.ConsumeByHashAsync(referenceValue.ToSha256(), ct); /// - public async Task GetPushedAuthorizationRequestAsync(string referenceValue, CT ct) + public async Task GetPushedAuthorizationRequestAsync(string referenceValue, Ct ct) { var par = await _store.GetByHashAsync(referenceValue.ToSha256(), ct); if (par == null) @@ -49,7 +49,7 @@ public class PushedAuthorizationService : IPushedAuthorizationService } /// - public async Task StoreAsync(DeserializedPushedAuthorizationRequest request, CT ct) + public async Task StoreAsync(DeserializedPushedAuthorizationRequest request, Ct ct) { var protectedData = _serializer.Serialize(request.PushedParameters); await _store.StoreAsync(new Models.PushedAuthorizationRequest diff --git a/identity-server/src/IdentityServer/Services/Default/ReturnUrlParser.cs b/identity-server/src/IdentityServer/Services/Default/ReturnUrlParser.cs index b4f9c65ae..3c1a63b1b 100644 --- a/identity-server/src/IdentityServer/Services/Default/ReturnUrlParser.cs +++ b/identity-server/src/IdentityServer/Services/Default/ReturnUrlParser.cs @@ -25,7 +25,7 @@ public class ReturnUrlParser /// The return URL. /// The cancellation token. /// - public virtual async Task ParseAsync(string returnUrl, CT ct) + public virtual async Task ParseAsync(string returnUrl, Ct ct) { using var activity = Tracing.ValidationActivitySource.StartActivity("ReturnUrlParser.Parse"); diff --git a/identity-server/src/IdentityServer/Services/Default/ServerSideSessionRefreshTokenService.cs b/identity-server/src/IdentityServer/Services/Default/ServerSideSessionRefreshTokenService.cs index 0a09a54c0..c648d5473 100644 --- a/identity-server/src/IdentityServer/Services/Default/ServerSideSessionRefreshTokenService.cs +++ b/identity-server/src/IdentityServer/Services/Default/ServerSideSessionRefreshTokenService.cs @@ -43,7 +43,7 @@ internal class ServerSideSessionRefreshTokenService : IRefreshTokenService /// - public virtual async Task ValidateRefreshTokenAsync(string tokenHandle, Client client, CT ct) + public virtual async Task ValidateRefreshTokenAsync(string tokenHandle, Client client, Ct ct) { var result = await Inner.ValidateRefreshTokenAsync(tokenHandle, client, ct); @@ -69,8 +69,8 @@ internal class ServerSideSessionRefreshTokenService : IRefreshTokenService } /// - public Task CreateRefreshTokenAsync(RefreshTokenCreationRequest request, CT ct) => Inner.CreateRefreshTokenAsync(request, ct); + public Task CreateRefreshTokenAsync(RefreshTokenCreationRequest request, Ct ct) => Inner.CreateRefreshTokenAsync(request, ct); /// - public Task UpdateRefreshTokenAsync(RefreshTokenUpdateRequest request, CT ct) => Inner.UpdateRefreshTokenAsync(request, ct); + public Task UpdateRefreshTokenAsync(RefreshTokenUpdateRequest request, Ct ct) => Inner.UpdateRefreshTokenAsync(request, ct); } diff --git a/identity-server/src/IdentityServer/Services/DiagnosticDataService.cs b/identity-server/src/IdentityServer/Services/DiagnosticDataService.cs index 5e0b3837f..29078da60 100644 --- a/identity-server/src/IdentityServer/Services/DiagnosticDataService.cs +++ b/identity-server/src/IdentityServer/Services/DiagnosticDataService.cs @@ -22,7 +22,7 @@ public class DiagnosticDataService _entries = entries; } - public async Task> GetJsonBytesAsync(CT ct) + public async Task> GetJsonBytesAsync(Ct ct) { var bufferWriter = new ArrayBufferWriter(); await using var writer = new Utf8JsonWriter(bufferWriter, new JsonWriterOptions { Indented = false }); @@ -42,7 +42,7 @@ public class DiagnosticDataService return bufferWriter.WrittenMemory; } - public async Task GetJsonStringAsync(CT ct) + public async Task GetJsonStringAsync(Ct ct) { var bytes = await GetJsonBytesAsync(ct); return Encoding.UTF8.GetString(bytes.Span); diff --git a/identity-server/src/IdentityServer/Services/IBackChannelLogoutHttpClient.cs b/identity-server/src/IdentityServer/Services/IBackChannelLogoutHttpClient.cs index 23e9da592..2e307d90e 100644 --- a/identity-server/src/IdentityServer/Services/IBackChannelLogoutHttpClient.cs +++ b/identity-server/src/IdentityServer/Services/IBackChannelLogoutHttpClient.cs @@ -18,5 +18,5 @@ public interface IBackChannelLogoutHttpClient /// /// The cancellation token. /// - Task PostAsync(string url, Dictionary payload, CT ct); + Task PostAsync(string url, Dictionary payload, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IBackChannelLogoutService.cs b/identity-server/src/IdentityServer/Services/IBackChannelLogoutService.cs index 716d2e7f8..0283fa4fe 100644 --- a/identity-server/src/IdentityServer/Services/IBackChannelLogoutService.cs +++ b/identity-server/src/IdentityServer/Services/IBackChannelLogoutService.cs @@ -18,5 +18,5 @@ public interface IBackChannelLogoutService /// /// The context of the back channel logout notification. /// The cancellation token. - Task SendLogoutNotificationsAsync(LogoutNotificationContext context, CT ct); + Task SendLogoutNotificationsAsync(LogoutNotificationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationInteractionService.cs b/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationInteractionService.cs index 0f1baa073..b895454f0 100644 --- a/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationInteractionService.cs +++ b/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationInteractionService.cs @@ -17,19 +17,19 @@ public interface IBackchannelAuthenticationInteractionService /// /// Returns the pending login requests for the current user. /// - Task> GetPendingLoginRequestsForCurrentUserAsync(CT ct); + Task> GetPendingLoginRequestsForCurrentUserAsync(Ct ct); /// /// Returns the login request for the id. /// - Task GetLoginRequestByInternalIdAsync(string id, CT ct); + Task GetLoginRequestByInternalIdAsync(string id, Ct ct); /// /// Completes the login request with the provided response for the current user or the subject passed. /// /// The completion request. /// The cancellation token. - Task CompleteLoginRequestAsync(CompleteBackchannelLoginRequest completionRequest, CT ct); + Task CompleteLoginRequestAsync(CompleteBackchannelLoginRequest completionRequest, Ct ct); } /// diff --git a/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationThrottlingService.cs b/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationThrottlingService.cs index 6162ea965..0784376cb 100644 --- a/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationThrottlingService.cs +++ b/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationThrottlingService.cs @@ -16,5 +16,5 @@ public interface IBackchannelAuthenticationThrottlingService /// /// Decides if the requesting client and request needs to slow down. /// - Task ShouldSlowDown(string requestId, BackChannelAuthenticationRequest details, CT ct); + Task ShouldSlowDown(string requestId, BackChannelAuthenticationRequest details, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationUserNotificationService.cs b/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationUserNotificationService.cs index 3c5b89968..d542c2fe0 100644 --- a/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationUserNotificationService.cs +++ b/identity-server/src/IdentityServer/Services/IBackchannelAuthenticationUserNotificationService.cs @@ -18,5 +18,5 @@ public interface IBackchannelAuthenticationUserNotificationService /// /// /// The cancellation token. - Task SendLoginRequestAsync(BackchannelUserLoginRequest request, CT ct); + Task SendLoginRequestAsync(BackchannelUserLoginRequest request, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/ICache.cs b/identity-server/src/IdentityServer/Services/ICache.cs index 3399867ab..c61e9461f 100644 --- a/identity-server/src/IdentityServer/Services/ICache.cs +++ b/identity-server/src/IdentityServer/Services/ICache.cs @@ -19,7 +19,7 @@ public interface ICache /// The key. /// The cancellation token. /// The cached item, or null if no item matches the key. - Task GetAsync(string key, CT ct); + Task GetAsync(string key, Ct ct); /// /// Gets the cached data based upon a key index. @@ -30,7 +30,7 @@ public interface ICache /// The function to obtain the item. /// The cancellation token. /// The cached item. - Task GetOrAddAsync(string key, TimeSpan duration, Func> get, CT ct); + Task GetOrAddAsync(string key, TimeSpan duration, Func> get, Ct ct); /// /// Caches the data based upon a key @@ -40,12 +40,12 @@ public interface ICache /// The expiration. /// The cancellation token. /// - Task SetAsync(string key, T item, TimeSpan expiration, CT ct); + Task SetAsync(string key, T item, TimeSpan expiration, Ct ct); /// /// Removes the cached data based upon a key index. /// /// The key. /// The cancellation token. - Task RemoveAsync(string key, CT ct); + Task RemoveAsync(string key, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IClaimsService.cs b/identity-server/src/IdentityServer/Services/IClaimsService.cs index 7d4270b1d..8741aa0dc 100644 --- a/identity-server/src/IdentityServer/Services/IClaimsService.cs +++ b/identity-server/src/IdentityServer/Services/IClaimsService.cs @@ -25,7 +25,7 @@ public interface IClaimsService /// /// Claims for the identity token /// - Task> GetIdentityTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, bool includeAllIdentityClaims, ValidatedRequest request, CT ct); + Task> GetIdentityTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, bool includeAllIdentityClaims, ValidatedRequest request, Ct ct); /// /// Returns claims for an access token. @@ -37,5 +37,5 @@ public interface IClaimsService /// /// Claims for the access token /// - Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, ValidatedRequest request, CT ct); + Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, ValidatedRequest request, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IConsentService.cs b/identity-server/src/IdentityServer/Services/IConsentService.cs index 23cdd7c07..1d6534f5e 100644 --- a/identity-server/src/IdentityServer/Services/IConsentService.cs +++ b/identity-server/src/IdentityServer/Services/IConsentService.cs @@ -25,7 +25,7 @@ public interface IConsentService /// /// Boolean if consent is required. /// - Task RequiresConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, CT ct); + Task RequiresConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, Ct ct); /// /// Updates the consent. @@ -35,5 +35,5 @@ public interface IConsentService /// The parsed scopes. /// The cancellation token. /// - Task UpdateConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, CT ct); + Task UpdateConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IDeviceFlowCodeService.cs b/identity-server/src/IdentityServer/Services/IDeviceFlowCodeService.cs index a992993b1..1d5ee1b42 100644 --- a/identity-server/src/IdentityServer/Services/IDeviceFlowCodeService.cs +++ b/identity-server/src/IdentityServer/Services/IDeviceFlowCodeService.cs @@ -19,7 +19,7 @@ public interface IDeviceFlowCodeService /// The user code. /// The data. /// The cancellation token. - Task StoreDeviceAuthorizationAsync(string userCode, DeviceCode data, CT ct); + Task StoreDeviceAuthorizationAsync(string userCode, DeviceCode data, Ct ct); /// /// Finds device authorization by user code. @@ -27,14 +27,14 @@ public interface IDeviceFlowCodeService /// The user code. /// The cancellation token. /// - Task FindByUserCodeAsync(string userCode, CT ct); + Task FindByUserCodeAsync(string userCode, Ct ct); /// /// Finds device authorization by device code. /// /// The device code. /// The cancellation token. - Task FindByDeviceCodeAsync(string deviceCode, CT ct); + Task FindByDeviceCodeAsync(string deviceCode, Ct ct); /// /// Updates device authorization, searching by user code. @@ -42,12 +42,12 @@ public interface IDeviceFlowCodeService /// The user code. /// The data. /// The cancellation token. - Task UpdateByUserCodeAsync(string userCode, DeviceCode data, CT ct); + Task UpdateByUserCodeAsync(string userCode, DeviceCode data, Ct ct); /// /// Removes the device authorization, searching by device code. /// /// The device code. /// The cancellation token. - Task RemoveByDeviceCodeAsync(string deviceCode, CT ct); + Task RemoveByDeviceCodeAsync(string deviceCode, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IDeviceFlowInteractionService.cs b/identity-server/src/IdentityServer/Services/IDeviceFlowInteractionService.cs index 79b3823e6..677120b5e 100644 --- a/identity-server/src/IdentityServer/Services/IDeviceFlowInteractionService.cs +++ b/identity-server/src/IdentityServer/Services/IDeviceFlowInteractionService.cs @@ -19,7 +19,7 @@ public interface IDeviceFlowInteractionService /// The user code. /// The cancellation token. /// - Task GetAuthorizationContextAsync(string userCode, CT ct); + Task GetAuthorizationContextAsync(string userCode, Ct ct); /// /// Handles the request asynchronously. @@ -28,5 +28,5 @@ public interface IDeviceFlowInteractionService /// The consent. /// The cancellation token. /// - Task HandleRequestAsync(string userCode, ConsentResponse consent, CT ct); + Task HandleRequestAsync(string userCode, ConsentResponse consent, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IDeviceFlowThrottlingService.cs b/identity-server/src/IdentityServer/Services/IDeviceFlowThrottlingService.cs index 2176a6b81..a8e8e66d2 100644 --- a/identity-server/src/IdentityServer/Services/IDeviceFlowThrottlingService.cs +++ b/identity-server/src/IdentityServer/Services/IDeviceFlowThrottlingService.cs @@ -20,5 +20,5 @@ public interface IDeviceFlowThrottlingService /// The device code details. /// The cancellation token. /// - Task ShouldSlowDown(string deviceCode, DeviceCode details, CT ct); + Task ShouldSlowDown(string deviceCode, DeviceCode details, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IEventService.cs b/identity-server/src/IdentityServer/Services/IEventService.cs index 0863c73fd..86468cca2 100644 --- a/identity-server/src/IdentityServer/Services/IEventService.cs +++ b/identity-server/src/IdentityServer/Services/IEventService.cs @@ -19,7 +19,7 @@ public interface IEventService /// The event. /// The cancellation token. #pragma warning disable CA1030 // This is our own eventing and this name is appropriate here - Task RaiseAsync(Event evt, CT ct); + Task RaiseAsync(Event evt, Ct ct); #pragma warning restore CA1030 /// diff --git a/identity-server/src/IdentityServer/Services/IEventSink.cs b/identity-server/src/IdentityServer/Services/IEventSink.cs index 88d10220c..d1d815cb4 100644 --- a/identity-server/src/IdentityServer/Services/IEventSink.cs +++ b/identity-server/src/IdentityServer/Services/IEventSink.cs @@ -18,5 +18,5 @@ public interface IEventSink /// /// The event. /// The cancellation token. - Task PersistAsync(Event evt, CT ct); + Task PersistAsync(Event evt, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IHandleGenerationService.cs b/identity-server/src/IdentityServer/Services/IHandleGenerationService.cs index 9ba1d33c5..2c4ba56c0 100644 --- a/identity-server/src/IdentityServer/Services/IHandleGenerationService.cs +++ b/identity-server/src/IdentityServer/Services/IHandleGenerationService.cs @@ -17,5 +17,5 @@ public interface IHandleGenerationService /// The cancellation token. /// The length. /// - Task GenerateAsync(CT ct, int length = 32); + Task GenerateAsync(Ct ct, int length = 32); } diff --git a/identity-server/src/IdentityServer/Services/IIdentityServerInteractionService.cs b/identity-server/src/IdentityServer/Services/IIdentityServerInteractionService.cs index 651e76409..2b34a3b7d 100644 --- a/identity-server/src/IdentityServer/Services/IIdentityServerInteractionService.cs +++ b/identity-server/src/IdentityServer/Services/IIdentityServerInteractionService.cs @@ -18,7 +18,7 @@ public interface IIdentityServerInteractionService /// /// The return URL. /// The cancellation token. - Task GetAuthorizationContextAsync(string? returnUrl, CT ct); + Task GetAuthorizationContextAsync(string? returnUrl, Ct ct); /// /// Indicates if the returnUrl is a valid URL for redirect after login or consent. @@ -31,21 +31,21 @@ public interface IIdentityServerInteractionService /// /// The error identifier. /// The cancellation token. - Task GetErrorContextAsync(string? errorId, CT ct); + Task GetErrorContextAsync(string? errorId, Ct ct); /// /// Gets the logout context. /// /// The logout identifier. /// The cancellation token. - Task GetLogoutContextAsync(string? logoutId, CT ct); + Task GetLogoutContextAsync(string? logoutId, Ct ct); /// /// Used to create a logoutId if there is not one presently. /// /// The cancellation token. /// - Task CreateLogoutContextAsync(CT ct); + Task CreateLogoutContextAsync(Ct ct); /// /// Informs IdentityServer of the user's consent. @@ -54,7 +54,7 @@ public interface IIdentityServerInteractionService /// The consent. /// The cancellation token. /// The subject. - Task GrantConsentAsync(AuthorizationRequest request, ConsentResponse consent, CT ct, string? subject = null); + Task GrantConsentAsync(AuthorizationRequest request, ConsentResponse consent, Ct ct, string? subject = null); /// /// Triggers error back to the client for the authorization request. @@ -64,24 +64,24 @@ public interface IIdentityServerInteractionService /// /// The cancellation token. /// - Task DenyAuthorizationAsync(AuthorizationRequest request, AuthorizationError error, CT ct, string? errorDescription = null); + Task DenyAuthorizationAsync(AuthorizationRequest request, AuthorizationError error, Ct ct, string? errorDescription = null); /// /// Returns a collection representing all of the user's consents and grants. /// /// The cancellation token. - Task> GetAllUserGrantsAsync(CT ct); + Task> GetAllUserGrantsAsync(Ct ct); /// /// Revokes all a user's consents and grants for a given client, or for all clients if clientId is null. /// /// The client identifier. /// The cancellation token. - Task RevokeUserConsentAsync(string? clientId, CT ct); + Task RevokeUserConsentAsync(string? clientId, Ct ct); /// /// Revokes all of a user's consents and grants for clients the user has signed into during their current session. /// /// The cancellation token. - Task RevokeTokensForCurrentSessionAsync(CT ct); + Task RevokeTokensForCurrentSessionAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IIssuerNameService.cs b/identity-server/src/IdentityServer/Services/IIssuerNameService.cs index c148a6e40..7b2c9f463 100644 --- a/identity-server/src/IdentityServer/Services/IIssuerNameService.cs +++ b/identity-server/src/IdentityServer/Services/IIssuerNameService.cs @@ -16,5 +16,5 @@ public interface IIssuerNameService /// /// The cancellation token. /// - Task GetCurrentAsync(CT ct); + Task GetCurrentAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IJwtRequestUriHttpClient.cs b/identity-server/src/IdentityServer/Services/IJwtRequestUriHttpClient.cs index 53874e7be..8a56fa295 100644 --- a/identity-server/src/IdentityServer/Services/IJwtRequestUriHttpClient.cs +++ b/identity-server/src/IdentityServer/Services/IJwtRequestUriHttpClient.cs @@ -20,5 +20,5 @@ public interface IJwtRequestUriHttpClient /// /// The cancellation token. /// - Task GetJwtAsync(string url, Client client, CT ct); + Task GetJwtAsync(string url, Client client, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IKeyMaterialService.cs b/identity-server/src/IdentityServer/Services/IKeyMaterialService.cs index 25c1909fb..57be8ff07 100644 --- a/identity-server/src/IdentityServer/Services/IKeyMaterialService.cs +++ b/identity-server/src/IdentityServer/Services/IKeyMaterialService.cs @@ -19,7 +19,7 @@ public interface IKeyMaterialService /// /// The cancellation token. /// - Task> GetValidationKeysAsync(CT ct); + Task> GetValidationKeysAsync(Ct ct); /// /// Gets the signing credentials. @@ -28,12 +28,12 @@ public interface IKeyMaterialService /// A value of null or empty indicates that the server default should be returned. /// The cancellation token. /// - Task GetSigningCredentialsAsync(IEnumerable? allowedAlgorithms, CT ct); + Task GetSigningCredentialsAsync(IEnumerable? allowedAlgorithms, Ct ct); /// /// Gets all signing credentials. /// /// The cancellation token. /// - Task> GetAllSigningCredentialsAsync(CT ct); + Task> GetAllSigningCredentialsAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/ILogoutNotificationService.cs b/identity-server/src/IdentityServer/Services/ILogoutNotificationService.cs index 4905e3c9c..568756274 100644 --- a/identity-server/src/IdentityServer/Services/ILogoutNotificationService.cs +++ b/identity-server/src/IdentityServer/Services/ILogoutNotificationService.cs @@ -18,14 +18,14 @@ public interface ILogoutNotificationService /// /// The context for the logout notification. /// The cancellation token. - Task> GetFrontChannelLogoutNotificationsUrlsAsync(LogoutNotificationContext context, CT ct); + Task> GetFrontChannelLogoutNotificationsUrlsAsync(LogoutNotificationContext context, Ct ct); /// /// Builds the http back-channel logout request data for the collection of clients. /// /// The context for the logout notification. /// The cancellation token. - Task> GetBackChannelLogoutNotificationsAsync(LogoutNotificationContext context, CT ct); + Task> GetBackChannelLogoutNotificationsAsync(LogoutNotificationContext context, Ct ct); } /// diff --git a/identity-server/src/IdentityServer/Services/IPersistedGrantService.cs b/identity-server/src/IdentityServer/Services/IPersistedGrantService.cs index f2c0fe792..cf423617e 100644 --- a/identity-server/src/IdentityServer/Services/IPersistedGrantService.cs +++ b/identity-server/src/IdentityServer/Services/IPersistedGrantService.cs @@ -19,7 +19,7 @@ public interface IPersistedGrantService /// The subject identifier. /// The cancellation token. /// - Task> GetAllGrantsAsync(string subjectId, CT ct); + Task> GetAllGrantsAsync(string subjectId, Ct ct); /// /// Removes all grants for a given subject id, and optionally client id and session id combination. @@ -29,5 +29,5 @@ public interface IPersistedGrantService /// The client identifier (optional). /// The session id (optional). /// - Task RemoveAllGrantsAsync(string subjectId, CT ct, string? clientId = null, string? sessionId = null); + Task RemoveAllGrantsAsync(string subjectId, Ct ct, string? clientId = null, string? sessionId = null); } diff --git a/identity-server/src/IdentityServer/Services/IProfileService.cs b/identity-server/src/IdentityServer/Services/IProfileService.cs index 2f87ab334..0caf0adbd 100644 --- a/identity-server/src/IdentityServer/Services/IProfileService.cs +++ b/identity-server/src/IdentityServer/Services/IProfileService.cs @@ -19,7 +19,7 @@ public interface IProfileService /// The context. /// The cancellation token. /// - Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct); + Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct); /// /// This method gets called whenever identity server needs to determine if the user is valid or active (e.g. if the user's account has been deactivated since they logged in). @@ -28,5 +28,5 @@ public interface IProfileService /// The context. /// The cancellation token. /// - Task IsActiveAsync(IsActiveContext context, CT ct); + Task IsActiveAsync(IsActiveContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IPushedAuthorizationService.cs b/identity-server/src/IdentityServer/Services/IPushedAuthorizationService.cs index 8c5ff478e..986b2dd3c 100644 --- a/identity-server/src/IdentityServer/Services/IPushedAuthorizationService.cs +++ b/identity-server/src/IdentityServer/Services/IPushedAuthorizationService.cs @@ -19,7 +19,7 @@ public interface IPushedAuthorizationService /// request without serialization or data protection applied /// The cancellation token. /// - Task StoreAsync(DeserializedPushedAuthorizationRequest pushedAuthorizationRequest, CT ct); + Task StoreAsync(DeserializedPushedAuthorizationRequest pushedAuthorizationRequest, Ct ct); /// /// Consumes the pushed authorization request, indicating that it should not @@ -32,7 +32,7 @@ public interface IPushedAuthorizationService /// authorization request. The reference value is the identifier within the /// request_uri parameter. /// The cancellation token. - Task ConsumeAsync(string referenceValue, CT ct); + Task ConsumeAsync(string referenceValue, Ct ct); /// /// Gets the raw pushed authorization parameters. @@ -44,5 +44,5 @@ public interface IPushedAuthorizationService /// The deserialized pushed authorization request, or null if the /// request does not exist or was previously consumed. /// - Task GetPushedAuthorizationRequestAsync(string referenceValue, CT ct); + Task GetPushedAuthorizationRequestAsync(string referenceValue, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IRefreshTokenService.cs b/identity-server/src/IdentityServer/Services/IRefreshTokenService.cs index 2b7a86a5b..737b4dd35 100644 --- a/identity-server/src/IdentityServer/Services/IRefreshTokenService.cs +++ b/identity-server/src/IdentityServer/Services/IRefreshTokenService.cs @@ -21,7 +21,7 @@ public interface IRefreshTokenService /// The client. /// The cancellation token. /// - Task ValidateRefreshTokenAsync(string token, Client client, CT ct); + Task ValidateRefreshTokenAsync(string token, Client client, Ct ct); /// /// Creates the refresh token. @@ -31,7 +31,7 @@ public interface IRefreshTokenService /// /// The refresh token handle /// - Task CreateRefreshTokenAsync(RefreshTokenCreationRequest request, CT ct); + Task CreateRefreshTokenAsync(RefreshTokenCreationRequest request, Ct ct); /// /// Updates the refresh token. @@ -41,5 +41,5 @@ public interface IRefreshTokenService /// /// The refresh token handle /// - Task UpdateRefreshTokenAsync(RefreshTokenUpdateRequest request, CT ct); + Task UpdateRefreshTokenAsync(RefreshTokenUpdateRequest request, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IReplayCache.cs b/identity-server/src/IdentityServer/Services/IReplayCache.cs index ce4d0b570..3461f624a 100644 --- a/identity-server/src/IdentityServer/Services/IReplayCache.cs +++ b/identity-server/src/IdentityServer/Services/IReplayCache.cs @@ -19,7 +19,7 @@ public interface IReplayCache /// /// The cancellation token. /// - Task AddAsync(string purpose, string handle, DateTimeOffset expiration, CT ct); + Task AddAsync(string purpose, string handle, DateTimeOffset expiration, Ct ct); /// @@ -29,5 +29,5 @@ public interface IReplayCache /// /// The cancellation token. /// - Task ExistsAsync(string purpose, string handle, CT ct); + Task ExistsAsync(string purpose, string handle, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IReturnUrlParser.cs b/identity-server/src/IdentityServer/Services/IReturnUrlParser.cs index 3b6220b06..8dfcaaa86 100644 --- a/identity-server/src/IdentityServer/Services/IReturnUrlParser.cs +++ b/identity-server/src/IdentityServer/Services/IReturnUrlParser.cs @@ -19,7 +19,7 @@ public interface IReturnUrlParser /// The return URL. /// The cancellation token. /// - Task ParseAsync(string returnUrl, CT ct); + Task ParseAsync(string returnUrl, Ct ct); /// /// Determines whether the return URL is valid. diff --git a/identity-server/src/IdentityServer/Services/ISessionCoordinationService.cs b/identity-server/src/IdentityServer/Services/ISessionCoordinationService.cs index f6e64d391..5de585565 100644 --- a/identity-server/src/IdentityServer/Services/ISessionCoordinationService.cs +++ b/identity-server/src/IdentityServer/Services/ISessionCoordinationService.cs @@ -16,12 +16,12 @@ public interface ISessionCoordinationService /// /// Coordinates when a user logs out. /// - Task ProcessLogoutAsync(UserSession session, CT ct); + Task ProcessLogoutAsync(UserSession session, Ct ct); /// /// Coordinates when a user session has expired. /// - Task ProcessExpirationAsync(UserSession session, CT ct); + Task ProcessExpirationAsync(UserSession session, Ct ct); /// /// Validates client request, and if valid extends server-side session. @@ -29,7 +29,7 @@ public interface ISessionCoordinationService /// /// The session validation request. /// The cancellation token. - Task ValidateSessionAsync(SessionValidationRequest request, CT ct); + Task ValidateSessionAsync(SessionValidationRequest request, Ct ct); } /// diff --git a/identity-server/src/IdentityServer/Services/ISessionManagementService.cs b/identity-server/src/IdentityServer/Services/ISessionManagementService.cs index dad0a7f6d..20fb8bc51 100644 --- a/identity-server/src/IdentityServer/Services/ISessionManagementService.cs +++ b/identity-server/src/IdentityServer/Services/ISessionManagementService.cs @@ -19,14 +19,14 @@ public interface ISessionManagementService /// /// The session query filter. /// The cancellation token. - Task> QuerySessionsAsync(SessionQuery? filter, CT ct); + Task> QuerySessionsAsync(SessionQuery? filter, Ct ct); /// /// Removes all the session related data for a user. /// /// The context describing what to remove. /// The cancellation token. - Task RemoveSessionsAsync(RemoveSessionsContext context, CT ct); + Task RemoveSessionsAsync(RemoveSessionsContext context, Ct ct); } /// diff --git a/identity-server/src/IdentityServer/Services/ITokenCreationService.cs b/identity-server/src/IdentityServer/Services/ITokenCreationService.cs index 6865688d6..def2c5f30 100644 --- a/identity-server/src/IdentityServer/Services/ITokenCreationService.cs +++ b/identity-server/src/IdentityServer/Services/ITokenCreationService.cs @@ -19,5 +19,5 @@ public interface ITokenCreationService /// The token description. /// The cancellation token. /// A protected and serialized security token - Task CreateTokenAsync(Token token, CT ct); + Task CreateTokenAsync(Token token, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/ITokenService.cs b/identity-server/src/IdentityServer/Services/ITokenService.cs index e9f01cb88..6d2dd7937 100644 --- a/identity-server/src/IdentityServer/Services/ITokenService.cs +++ b/identity-server/src/IdentityServer/Services/ITokenService.cs @@ -19,7 +19,7 @@ public interface ITokenService /// The token creation request. /// The cancellation token. /// An identity token - Task CreateIdentityTokenAsync(TokenCreationRequest request, CT ct); + Task CreateIdentityTokenAsync(TokenCreationRequest request, Ct ct); /// /// Creates an access token. @@ -27,7 +27,7 @@ public interface ITokenService /// The token creation request. /// The cancellation token. /// An access token - Task CreateAccessTokenAsync(TokenCreationRequest request, CT ct); + Task CreateAccessTokenAsync(TokenCreationRequest request, Ct ct); /// /// Creates a serialized and protected security token. @@ -35,5 +35,5 @@ public interface ITokenService /// The token. /// The cancellation token. /// A security token in serialized form - Task CreateSecurityTokenAsync(Token token, CT ct); + Task CreateSecurityTokenAsync(Token token, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IUiLocalesService.cs b/identity-server/src/IdentityServer/Services/IUiLocalesService.cs index 2b2f98be5..6cfcf925f 100644 --- a/identity-server/src/IdentityServer/Services/IUiLocalesService.cs +++ b/identity-server/src/IdentityServer/Services/IUiLocalesService.cs @@ -11,5 +11,5 @@ public interface IUiLocalesService /// /// /// The cancellation token. - Task StoreUiLocalesForRedirectAsync(string? uiLocales, CT ct); + Task StoreUiLocalesForRedirectAsync(string? uiLocales, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IUserCodeGenerator.cs b/identity-server/src/IdentityServer/Services/IUserCodeGenerator.cs index 2a658ed1d..090caa45d 100644 --- a/identity-server/src/IdentityServer/Services/IUserCodeGenerator.cs +++ b/identity-server/src/IdentityServer/Services/IUserCodeGenerator.cs @@ -32,5 +32,5 @@ public interface IUserCodeGenerator /// /// The cancellation token. /// - Task GenerateAsync(CT ct); + Task GenerateAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IUserCodeService.cs b/identity-server/src/IdentityServer/Services/IUserCodeService.cs index c6ec6647b..c106b99ed 100644 --- a/identity-server/src/IdentityServer/Services/IUserCodeService.cs +++ b/identity-server/src/IdentityServer/Services/IUserCodeService.cs @@ -17,5 +17,5 @@ public interface IUserCodeService /// Type of user code. /// The cancellation token. /// - Task GetGenerator(string userCodeType, CT ct); + Task GetGenerator(string userCodeType, Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/IUserSession.cs b/identity-server/src/IdentityServer/Services/IUserSession.cs index bd4c2a9c4..ad88e4877 100644 --- a/identity-server/src/IdentityServer/Services/IUserSession.cs +++ b/identity-server/src/IdentityServer/Services/IUserSession.cs @@ -20,33 +20,33 @@ public interface IUserSession /// /// /// The cancellation token. - Task CreateSessionIdAsync(ClaimsPrincipal principal, AuthenticationProperties properties, CT ct); + Task CreateSessionIdAsync(ClaimsPrincipal principal, AuthenticationProperties properties, Ct ct); /// /// Gets the current authenticated user. /// /// The cancellation token. - Task GetUserAsync(CT ct); + Task GetUserAsync(Ct ct); /// /// Gets the current session identifier. /// /// The cancellation token. /// - Task GetSessionIdAsync(CT ct); + Task GetSessionIdAsync(Ct ct); /// /// Ensures the session identifier cookie asynchronously. /// /// The cancellation token. /// - Task EnsureSessionIdCookieAsync(CT ct); + Task EnsureSessionIdCookieAsync(Ct ct); /// /// Removes the session identifier cookie. /// /// The cancellation token. - Task RemoveSessionIdCookieAsync(CT ct); + Task RemoveSessionIdCookieAsync(Ct ct); /// /// Adds a client to the list of clients the user has signed into during their session. @@ -54,12 +54,12 @@ public interface IUserSession /// The client identifier. /// The cancellation token. /// - Task AddClientIdAsync(string clientId, CT ct); + Task AddClientIdAsync(string clientId, Ct ct); /// /// Gets the list of clients the user has signed into during their session. /// /// The cancellation token. /// - Task> GetClientListAsync(CT ct); + Task> GetClientListAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Services/InMemory/InMemoryCorsPolicyService.cs b/identity-server/src/IdentityServer/Services/InMemory/InMemoryCorsPolicyService.cs index 81ac657e1..cdae13db0 100644 --- a/identity-server/src/IdentityServer/Services/InMemory/InMemoryCorsPolicyService.cs +++ b/identity-server/src/IdentityServer/Services/InMemory/InMemoryCorsPolicyService.cs @@ -35,7 +35,7 @@ public class InMemoryCorsPolicyService : ICorsPolicyService } /// - public virtual Task IsOriginAllowedAsync(string origin, CT ct) + public virtual Task IsOriginAllowedAsync(string origin, Ct ct) { using var activity = Tracing.ServiceActivitySource.StartActivity("InMemoryCorsPolicyService.IsOriginAllowedAsync"); diff --git a/identity-server/src/IdentityServer/Stores/Caching/CachingClientStore.cs b/identity-server/src/IdentityServer/Stores/Caching/CachingClientStore.cs index 51f0eb548..118a50e85 100644 --- a/identity-server/src/IdentityServer/Stores/Caching/CachingClientStore.cs +++ b/identity-server/src/IdentityServer/Stores/Caching/CachingClientStore.cs @@ -41,7 +41,7 @@ public class CachingClientStore : IClientStore /// /// The client /// - public async Task FindClientByIdAsync(string clientId, CT ct) + public async Task FindClientByIdAsync(string clientId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingClientStore.FindClientById"); activity?.SetTag(Tracing.Properties.ClientId, clientId); @@ -56,7 +56,7 @@ public class CachingClientStore : IClientStore #if NET10_0_OR_GREATER /// - public IAsyncEnumerable GetAllClientsAsync(CT ct) + public IAsyncEnumerable GetAllClientsAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingClientStore.GetAllClients"); return _inner.GetAllClientsAsync(ct); diff --git a/identity-server/src/IdentityServer/Stores/Caching/CachingCorsPolicyService.cs b/identity-server/src/IdentityServer/Stores/Caching/CachingCorsPolicyService.cs index bb6ece5e7..4079db8ca 100644 --- a/identity-server/src/IdentityServer/Stores/Caching/CachingCorsPolicyService.cs +++ b/identity-server/src/IdentityServer/Stores/Caching/CachingCorsPolicyService.cs @@ -50,7 +50,7 @@ public class CachingCorsPolicyService : ICorsPolicyService } /// - public virtual async Task IsOriginAllowedAsync(string origin, CT ct) + public virtual async Task IsOriginAllowedAsync(string origin, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingCorsPolicyService.IsOriginAllowed"); activity?.SetTag(Tracing.Properties.Origin, origin); diff --git a/identity-server/src/IdentityServer/Stores/Caching/CachingResourceStore.cs b/identity-server/src/IdentityServer/Stores/Caching/CachingResourceStore.cs index daec6a5cd..2eee090c6 100644 --- a/identity-server/src/IdentityServer/Stores/Caching/CachingResourceStore.cs +++ b/identity-server/src/IdentityServer/Stores/Caching/CachingResourceStore.cs @@ -80,7 +80,7 @@ public class CachingResourceStore : IResourceStore } /// - public async Task GetAllResourcesAsync(CT ct) + public async Task GetAllResourcesAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingResourceStore.GetAllResources"); @@ -95,7 +95,7 @@ public class CachingResourceStore : IResourceStore } /// - public async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) + public async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingResourceStore.FindApiResourcesByScopeName"); activity?.SetTag(Tracing.Properties.ScopeNames, scopeNames.ToSpaceSeparatedString()); @@ -166,7 +166,7 @@ public class CachingResourceStore : IResourceStore /// - public async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, CT ct) + public async Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingResourceStore.FindApiResourcesByName"); activity?.SetTag(Tracing.Properties.ApiResourceNames, apiResourceNames.ToSpaceSeparatedString()); @@ -177,7 +177,7 @@ public class CachingResourceStore : IResourceStore } /// - public async Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) + public async Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingResourceStore.FindIdentityResourcesByScopeName"); activity?.SetTag(Tracing.Properties.ScopeNames, scopeNames.ToSpaceSeparatedString()); @@ -188,7 +188,7 @@ public class CachingResourceStore : IResourceStore } /// - public async Task> FindApiScopesByNameAsync(IEnumerable scopeNames, CT ct) + public async Task> FindApiScopesByNameAsync(IEnumerable scopeNames, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("CachingResourceStore.FindApiScopesByName"); activity?.SetTag(Tracing.Properties.ScopeNames, scopeNames.ToSpaceSeparatedString()); @@ -202,11 +202,11 @@ public class CachingResourceStore : IResourceStore private async Task> FindItemsAsync( IEnumerable names, ICache cache, - Func, CT, Task> getResourcesFunc, + Func, Ct, Task> getResourcesFunc, Func> getFromResourcesFunc, Func getNameFunc, string allCachePrefix, - CT ct + Ct ct ) where TItem : class { diff --git a/identity-server/src/IdentityServer/Stores/Default/ConsentMessageStore.cs b/identity-server/src/IdentityServer/Stores/Default/ConsentMessageStore.cs index 963908d00..de9d4bf97 100644 --- a/identity-server/src/IdentityServer/Stores/Default/ConsentMessageStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/ConsentMessageStore.cs @@ -12,7 +12,7 @@ internal class ConsentMessageStore : IConsentMessageStore public ConsentMessageStore(MessageCookie cookie) => Cookie = cookie; - public virtual Task DeleteAsync(string id, CT ct) + public virtual Task DeleteAsync(string id, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ConsentMessageStore.Delete"); @@ -20,14 +20,14 @@ internal class ConsentMessageStore : IConsentMessageStore return Task.CompletedTask; } - public virtual Task> ReadAsync(string id, CT ct) + public virtual Task> ReadAsync(string id, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ConsentMessageStore.Read"); return Task.FromResult(Cookie.Read(id)); } - public virtual Task WriteAsync(string id, Message message, CT ct) + public virtual Task WriteAsync(string id, Message message, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ConsentMessageStore.Write"); diff --git a/identity-server/src/IdentityServer/Stores/Default/DefaultAuthorizationCodeStore.cs b/identity-server/src/IdentityServer/Stores/Default/DefaultAuthorizationCodeStore.cs index 103de5c34..7a68856c9 100644 --- a/identity-server/src/IdentityServer/Stores/Default/DefaultAuthorizationCodeStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/DefaultAuthorizationCodeStore.cs @@ -32,7 +32,7 @@ public class DefaultAuthorizationCodeStore : DefaultGrantStore - public Task StoreAuthorizationCodeAsync(AuthorizationCode code, CT ct) + public Task StoreAuthorizationCodeAsync(AuthorizationCode code, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultAuthorizationCodeStore.StoreAuthorizationCode"); @@ -40,7 +40,7 @@ public class DefaultAuthorizationCodeStore : DefaultGrantStore - public Task GetAuthorizationCodeAsync(string code, CT ct) + public Task GetAuthorizationCodeAsync(string code, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultAuthorizationCodeStore.GetAuthorizationCode"); @@ -48,7 +48,7 @@ public class DefaultAuthorizationCodeStore : DefaultGrantStore - public Task RemoveAuthorizationCodeAsync(string code, CT ct) + public Task RemoveAuthorizationCodeAsync(string code, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultAuthorizationCodeStore.RemoveAuthorizationCode"); diff --git a/identity-server/src/IdentityServer/Stores/Default/DefaultBackChannelAuthenticationRequestStore.cs b/identity-server/src/IdentityServer/Stores/Default/DefaultBackChannelAuthenticationRequestStore.cs index dae24f7fc..e28e55dbc 100644 --- a/identity-server/src/IdentityServer/Stores/Default/DefaultBackChannelAuthenticationRequestStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/DefaultBackChannelAuthenticationRequestStore.cs @@ -32,7 +32,7 @@ public class DefaultBackChannelAuthenticationRequestStore : DefaultGrantStore - public async Task CreateRequestAsync(BackChannelAuthenticationRequest request, CT ct) + public async Task CreateRequestAsync(BackChannelAuthenticationRequest request, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultBackChannelAuthenticationRequestStore.CreateRequest"); @@ -43,7 +43,7 @@ public class DefaultBackChannelAuthenticationRequestStore : DefaultGrantStore - public Task GetByInternalIdAsync(string id, CT ct) + public Task GetByInternalIdAsync(string id, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultBackChannelAuthenticationRequestStore.GetByInternalId"); @@ -51,7 +51,7 @@ public class DefaultBackChannelAuthenticationRequestStore : DefaultGrantStore - public Task GetByAuthenticationRequestIdAsync(string requestId, CT ct) + public Task GetByAuthenticationRequestIdAsync(string requestId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultBackChannelAuthenticationRequestStore.GetByAuthenticationRequestId"); @@ -59,7 +59,7 @@ public class DefaultBackChannelAuthenticationRequestStore : DefaultGrantStore - public Task RemoveByInternalIdAsync(string requestId, CT ct) + public Task RemoveByInternalIdAsync(string requestId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultBackChannelAuthenticationRequestStore.RemoveByInternalId"); @@ -67,7 +67,7 @@ public class DefaultBackChannelAuthenticationRequestStore : DefaultGrantStore - public Task> GetLoginsForUserAsync(string subjectId, CT ct, string clientId = null) + public Task> GetLoginsForUserAsync(string subjectId, Ct ct, string clientId = null) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultBackChannelAuthenticationRequestStore.GetLoginsForUser"); @@ -79,7 +79,7 @@ public class DefaultBackChannelAuthenticationRequestStore : DefaultGrantStore - public Task UpdateByInternalIdAsync(string id, BackChannelAuthenticationRequest request, CT ct) + public Task UpdateByInternalIdAsync(string id, BackChannelAuthenticationRequest request, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultBackChannelAuthenticationRequestStore.UpdateByInternalId"); diff --git a/identity-server/src/IdentityServer/Stores/Default/DefaultGrantStore.cs b/identity-server/src/IdentityServer/Stores/Default/DefaultGrantStore.cs index 261bff6f1..390252a79 100644 --- a/identity-server/src/IdentityServer/Stores/Default/DefaultGrantStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/DefaultGrantStore.cs @@ -80,7 +80,7 @@ public class DefaultGrantStore /// /// Creates a handle. /// - protected async Task CreateHandleAsync(CT ct) => await HandleGenerationService.GenerateAsync(ct) + HexEncodingFormatSuffix; + protected async Task CreateHandleAsync(Ct ct) => await HandleGenerationService.GenerateAsync(ct) + HexEncodingFormatSuffix; /// /// Gets the hashed key. @@ -109,7 +109,7 @@ public class DefaultGrantStore /// The key. /// The cancellation token. /// - protected virtual async Task GetItemAsync(string key, CT ct) + protected virtual async Task GetItemAsync(string key, Ct ct) { var hashedKey = GetHashedKey(key); var item = await GetItemByHashedKeyAsync(hashedKey, ct); @@ -126,7 +126,7 @@ public class DefaultGrantStore /// /// The cancellation token. /// - protected virtual async Task GetItemByHashedKeyAsync(string hashedKey, CT ct) + protected virtual async Task GetItemByHashedKeyAsync(string hashedKey, Ct ct) { var grant = await Store.GetAsync(hashedKey, ct); if (grant != null && grant.Type == GrantType) @@ -149,7 +149,7 @@ public class DefaultGrantStore /// /// The filter. /// The cancellation token. - protected virtual async Task> GetAllAsync(PersistedGrantFilter filter, CT ct) + protected virtual async Task> GetAllAsync(PersistedGrantFilter filter, Ct ct) { filter.Type = GrantType; var items = await Store.GetAllAsync(filter, ct); @@ -169,7 +169,7 @@ public class DefaultGrantStore /// The lifetime. /// The cancellation token. /// - protected virtual async Task CreateItemAsync(T item, string clientId, string subjectId, string sessionId, string description, DateTime created, int lifetime, CT ct) + protected virtual async Task CreateItemAsync(T item, string clientId, string subjectId, string sessionId, string description, DateTime created, int lifetime, Ct ct) { var handle = await CreateHandleAsync(ct); await StoreItemAsync(handle, item, clientId, subjectId, sessionId, description, created, created.AddSeconds(lifetime), ct); @@ -190,7 +190,7 @@ public class DefaultGrantStore /// The cancellation token. /// The consumed time. /// - protected virtual Task StoreItemAsync(string key, T item, string clientId, string subjectId, string sessionId, string description, DateTime created, DateTime? expiration, CT ct, DateTime? consumedTime = null) + protected virtual Task StoreItemAsync(string key, T item, string clientId, string subjectId, string sessionId, string description, DateTime created, DateTime? expiration, Ct ct, DateTime? consumedTime = null) { key = GetHashedKey(key); return StoreItemByHashedKeyAsync(key, item, clientId, subjectId, sessionId, description, created, expiration, ct, consumedTime); @@ -210,7 +210,7 @@ public class DefaultGrantStore /// The cancellation token. /// The consumed time. /// - protected virtual async Task StoreItemByHashedKeyAsync(string hashedKey, T item, string clientId, string subjectId, string sessionId, string description, DateTime created, DateTime? expiration, CT ct, DateTime? consumedTime = null) + protected virtual async Task StoreItemByHashedKeyAsync(string hashedKey, T item, string clientId, string subjectId, string sessionId, string description, DateTime created, DateTime? expiration, Ct ct, DateTime? consumedTime = null) { var json = Serializer.Serialize(item); @@ -237,7 +237,7 @@ public class DefaultGrantStore /// The key. /// The cancellation token. /// - protected virtual Task RemoveItemAsync(string key, CT ct) + protected virtual Task RemoveItemAsync(string key, Ct ct) { key = GetHashedKey(key); return RemoveItemByHashedKeyAsync(key, ct); @@ -249,7 +249,7 @@ public class DefaultGrantStore /// The key. /// The cancellation token. /// - protected virtual async Task RemoveItemByHashedKeyAsync(string key, CT ct) => await Store.RemoveAsync(key, ct); + protected virtual async Task RemoveItemByHashedKeyAsync(string key, Ct ct) => await Store.RemoveAsync(key, ct); /// /// Removes all items for a subject id / client id combination. @@ -259,7 +259,7 @@ public class DefaultGrantStore /// The cancellation token. /// The optional session identifier. /// - protected virtual async Task RemoveAllAsync(string subjectId, string clientId, CT ct, string sessionId = null) => await Store.RemoveAllAsync(new PersistedGrantFilter + protected virtual async Task RemoveAllAsync(string subjectId, string clientId, Ct ct, string sessionId = null) => await Store.RemoveAllAsync(new PersistedGrantFilter { SubjectId = subjectId, ClientId = clientId, diff --git a/identity-server/src/IdentityServer/Stores/Default/DefaultReferenceTokenStore.cs b/identity-server/src/IdentityServer/Stores/Default/DefaultReferenceTokenStore.cs index bb05e4f24..8e0913c52 100644 --- a/identity-server/src/IdentityServer/Stores/Default/DefaultReferenceTokenStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/DefaultReferenceTokenStore.cs @@ -31,7 +31,7 @@ public class DefaultReferenceTokenStore : DefaultGrantStore, IReferenceTo } /// - public Task StoreReferenceTokenAsync(Token token, CT ct) + public Task StoreReferenceTokenAsync(Token token, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultReferenceTokenStore.StoreReferenceToken"); @@ -39,7 +39,7 @@ public class DefaultReferenceTokenStore : DefaultGrantStore, IReferenceTo } /// - public Task GetReferenceTokenAsync(string handle, CT ct) + public Task GetReferenceTokenAsync(string handle, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultReferenceTokenStore.GetReferenceToken"); @@ -47,7 +47,7 @@ public class DefaultReferenceTokenStore : DefaultGrantStore, IReferenceTo } /// - public Task RemoveReferenceTokenAsync(string handle, CT ct) + public Task RemoveReferenceTokenAsync(string handle, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultReferenceTokenStore.RemoveReferenceToken"); @@ -55,7 +55,7 @@ public class DefaultReferenceTokenStore : DefaultGrantStore, IReferenceTo } /// - public Task RemoveReferenceTokensAsync(string subjectId, string clientId, string sessionId, CT ct) + public Task RemoveReferenceTokensAsync(string subjectId, string clientId, string sessionId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultReferenceTokenStore.RemoveReferenceTokens"); diff --git a/identity-server/src/IdentityServer/Stores/Default/DefaultRefreshTokenStore.cs b/identity-server/src/IdentityServer/Stores/Default/DefaultRefreshTokenStore.cs index bc12290a4..93ebcb822 100644 --- a/identity-server/src/IdentityServer/Stores/Default/DefaultRefreshTokenStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/DefaultRefreshTokenStore.cs @@ -31,7 +31,7 @@ public class DefaultRefreshTokenStore : DefaultGrantStore, IRefres } /// - public async Task StoreRefreshTokenAsync(RefreshToken refreshToken, CT ct) + public async Task StoreRefreshTokenAsync(RefreshToken refreshToken, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultRefreshTokenStore.StoreRefreshTokenAsync"); @@ -39,7 +39,7 @@ public class DefaultRefreshTokenStore : DefaultGrantStore, IRefres } /// - public Task UpdateRefreshTokenAsync(string handle, RefreshToken refreshToken, CT ct) + public Task UpdateRefreshTokenAsync(string handle, RefreshToken refreshToken, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultRefreshTokenStore.UpdateRefreshToken"); @@ -47,7 +47,7 @@ public class DefaultRefreshTokenStore : DefaultGrantStore, IRefres } /// - public Task GetRefreshTokenAsync(string refreshTokenHandle, CT ct) + public Task GetRefreshTokenAsync(string refreshTokenHandle, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultRefreshTokenStore.GetRefreshToken"); @@ -55,7 +55,7 @@ public class DefaultRefreshTokenStore : DefaultGrantStore, IRefres } /// - public Task RemoveRefreshTokenAsync(string refreshTokenHandle, CT ct) + public Task RemoveRefreshTokenAsync(string refreshTokenHandle, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultRefreshTokenStore.RemoveRefreshToken"); @@ -63,7 +63,7 @@ public class DefaultRefreshTokenStore : DefaultGrantStore, IRefres } /// - public Task RemoveRefreshTokensAsync(string subjectId, string clientId, CT ct) + public Task RemoveRefreshTokensAsync(string subjectId, string clientId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultRefreshTokenStore.RemoveRefreshTokens"); diff --git a/identity-server/src/IdentityServer/Stores/Default/DefaultUserConsentStore.cs b/identity-server/src/IdentityServer/Stores/Default/DefaultUserConsentStore.cs index 0f3d01395..daf63a2e8 100644 --- a/identity-server/src/IdentityServer/Stores/Default/DefaultUserConsentStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/DefaultUserConsentStore.cs @@ -43,7 +43,7 @@ public class DefaultUserConsentStore : DefaultGrantStore, IUserConsentS } /// - public Task StoreUserConsentAsync(Consent consent, CT ct) + public Task StoreUserConsentAsync(Consent consent, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultUserConsentStore.StoreUserConsent"); @@ -52,7 +52,7 @@ public class DefaultUserConsentStore : DefaultGrantStore, IUserConsentS } /// - public async Task GetUserConsentAsync(string subjectId, string clientId, CT ct) + public async Task GetUserConsentAsync(string subjectId, string clientId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultUserConsentStore.GetUserConsent"); @@ -73,7 +73,7 @@ public class DefaultUserConsentStore : DefaultGrantStore, IUserConsentS } /// - public Task RemoveUserConsentAsync(string subjectId, string clientId, CT ct) + public Task RemoveUserConsentAsync(string subjectId, string clientId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DefaultUserConsentStore.RemoveUserConsent"); diff --git a/identity-server/src/IdentityServer/Stores/Default/DistributedCacheAuthorizationParametersMessageStore.cs b/identity-server/src/IdentityServer/Stores/Default/DistributedCacheAuthorizationParametersMessageStore.cs index 486287a09..dc578a8f8 100644 --- a/identity-server/src/IdentityServer/Stores/Default/DistributedCacheAuthorizationParametersMessageStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/DistributedCacheAuthorizationParametersMessageStore.cs @@ -31,7 +31,7 @@ public class DistributedCacheAuthorizationParametersMessageStore : IAuthorizatio private static string CacheKeyPrefix => "DistributedCacheAuthorizationParametersMessageStore"; /// - public virtual async Task WriteAsync(Message> message, CT ct) + public virtual async Task WriteAsync(Message> message, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DistributedCacheAuthorizationParametersMessageStore.Write"); @@ -55,7 +55,7 @@ public class DistributedCacheAuthorizationParametersMessageStore : IAuthorizatio } /// - public virtual async Task>> ReadAsync(string id, CT ct) + public virtual async Task>> ReadAsync(string id, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DistributedCacheAuthorizationParametersMessageStore.Read"); @@ -71,7 +71,7 @@ public class DistributedCacheAuthorizationParametersMessageStore : IAuthorizatio } /// - public virtual Task DeleteAsync(string id, CT ct) + public virtual Task DeleteAsync(string id, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("DistributedCacheAuthorizationParametersMessageStore.Delete"); diff --git a/identity-server/src/IdentityServer/Stores/Default/ProtectedDataMessageStore.cs b/identity-server/src/IdentityServer/Stores/Default/ProtectedDataMessageStore.cs index 7c03f776e..cc343e2d6 100644 --- a/identity-server/src/IdentityServer/Stores/Default/ProtectedDataMessageStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/ProtectedDataMessageStore.cs @@ -40,7 +40,7 @@ public class ProtectedDataMessageStore : IMessageStore } /// - public virtual Task> ReadAsync(string value, CT ct) + public virtual Task> ReadAsync(string value, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ProtectedDataMessageStore.Read"); @@ -65,7 +65,7 @@ public class ProtectedDataMessageStore : IMessageStore } /// - public virtual Task WriteAsync(Message message, CT ct) + public virtual Task WriteAsync(Message message, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ProtectedDataMessageStore.Write"); diff --git a/identity-server/src/IdentityServer/Stores/Default/QueryStringAuthorizationParametersMessageStore.cs b/identity-server/src/IdentityServer/Stores/Default/QueryStringAuthorizationParametersMessageStore.cs index 95205d446..ffacd361d 100644 --- a/identity-server/src/IdentityServer/Stores/Default/QueryStringAuthorizationParametersMessageStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/QueryStringAuthorizationParametersMessageStore.cs @@ -10,18 +10,18 @@ namespace Duende.IdentityServer.Stores; // internal just for testing internal class QueryStringAuthorizationParametersMessageStore : IAuthorizationParametersMessageStore { - public Task WriteAsync(Message> message, CT ct) + public Task WriteAsync(Message> message, Ct ct) { var queryString = message.Data.FromFullDictionary().ToQueryString(); return Task.FromResult(queryString); } - public Task>> ReadAsync(string id, CT ct) + public Task>> ReadAsync(string id, Ct ct) { var values = id.ReadQueryStringAsNameValueCollection(); var msg = new Message>(values.ToFullDictionary()); return Task.FromResult(msg); } - public Task DeleteAsync(string id, CT ct) => Task.CompletedTask; + public Task DeleteAsync(string id, Ct ct) => Task.CompletedTask; } diff --git a/identity-server/src/IdentityServer/Stores/Default/ServerSideTicketStore.cs b/identity-server/src/IdentityServer/Stores/Default/ServerSideTicketStore.cs index 9f89c0476..790335886 100644 --- a/identity-server/src/IdentityServer/Stores/Default/ServerSideTicketStore.cs +++ b/identity-server/src/IdentityServer/Stores/Default/ServerSideTicketStore.cs @@ -185,7 +185,7 @@ public class ServerSideTicketStore : IServerSideTicketStore } /// - public async Task> GetSessionsAsync(SessionFilter filter, CT ct) + public async Task> GetSessionsAsync(SessionFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideTicketStore.GetSessions"); @@ -196,7 +196,7 @@ public class ServerSideTicketStore : IServerSideTicketStore } /// - public async Task> QuerySessionsAsync(SessionQuery filter, CT ct) + public async Task> QuerySessionsAsync(SessionQuery filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideTicketStore.QuerySessions"); @@ -219,7 +219,7 @@ public class ServerSideTicketStore : IServerSideTicketStore } /// - public async Task> GetAndRemoveExpiredSessionsAsync(int count, CT ct) + public async Task> GetAndRemoveExpiredSessionsAsync(int count, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ServerSideTicketStore.GetAndRemoveExpiredSessions"); diff --git a/identity-server/src/IdentityServer/Stores/Empty/EmptyClientStore.cs b/identity-server/src/IdentityServer/Stores/Empty/EmptyClientStore.cs index 4864573e0..68c3cd2ce 100644 --- a/identity-server/src/IdentityServer/Stores/Empty/EmptyClientStore.cs +++ b/identity-server/src/IdentityServer/Stores/Empty/EmptyClientStore.cs @@ -9,10 +9,10 @@ namespace Duende.IdentityServer.Stores.Empty; internal class EmptyClientStore : IClientStore { - public Task FindClientByIdAsync(string clientId, CT _) => Task.FromResult(null); + public Task FindClientByIdAsync(string clientId, Ct _) => Task.FromResult(null); #if NET10_0_OR_GREATER - public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] CT _) + public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] Ct _) { await Task.CompletedTask; yield break; diff --git a/identity-server/src/IdentityServer/Stores/Empty/EmptyResourceStore.cs b/identity-server/src/IdentityServer/Stores/Empty/EmptyResourceStore.cs index 834918475..c69c44efa 100644 --- a/identity-server/src/IdentityServer/Stores/Empty/EmptyResourceStore.cs +++ b/identity-server/src/IdentityServer/Stores/Empty/EmptyResourceStore.cs @@ -8,13 +8,13 @@ namespace Duende.IdentityServer.Stores.Empty; internal class EmptyResourceStore : IResourceStore { - public Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, CT ct) => Task.FromResult(Enumerable.Empty()); + public Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, Ct ct) => Task.FromResult(Enumerable.Empty()); - public Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) => Task.FromResult(Enumerable.Empty()); + public Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) => Task.FromResult(Enumerable.Empty()); - public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, CT ct) => Task.FromResult(Enumerable.Empty()); + public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, Ct ct) => Task.FromResult(Enumerable.Empty()); - public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) => Task.FromResult(Enumerable.Empty()); + public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) => Task.FromResult(Enumerable.Empty()); - public Task GetAllResourcesAsync(CT ct) => Task.FromResult(new Resources() { OfflineAccess = true }); + public Task GetAllResourcesAsync(Ct ct) => Task.FromResult(new Resources() { OfflineAccess = true }); } diff --git a/identity-server/src/IdentityServer/Stores/IAuthorizationParametersMessageStore.cs b/identity-server/src/IdentityServer/Stores/IAuthorizationParametersMessageStore.cs index f5ed6213e..fef9af6c4 100644 --- a/identity-server/src/IdentityServer/Stores/IAuthorizationParametersMessageStore.cs +++ b/identity-server/src/IdentityServer/Stores/IAuthorizationParametersMessageStore.cs @@ -17,7 +17,7 @@ public interface IAuthorizationParametersMessageStore /// The message. /// The cancellation token. /// The identifier for the stored message. - Task WriteAsync(Message> message, CT ct); + Task WriteAsync(Message> message, Ct ct); /// /// Reads the authorization parameters. @@ -25,7 +25,7 @@ public interface IAuthorizationParametersMessageStore /// The identifier. /// The cancellation token. /// - Task>> ReadAsync(string id, CT ct); + Task>> ReadAsync(string id, Ct ct); /// /// Deletes the authorization parameters. @@ -33,5 +33,5 @@ public interface IAuthorizationParametersMessageStore /// The identifier. /// The cancellation token. /// - Task DeleteAsync(string id, CT ct); + Task DeleteAsync(string id, Ct ct); } diff --git a/identity-server/src/IdentityServer/Stores/IConsentMessageStore.cs b/identity-server/src/IdentityServer/Stores/IConsentMessageStore.cs index c9928371c..a9f0a493e 100644 --- a/identity-server/src/IdentityServer/Stores/IConsentMessageStore.cs +++ b/identity-server/src/IdentityServer/Stores/IConsentMessageStore.cs @@ -17,7 +17,7 @@ public interface IConsentMessageStore /// The id for the message. /// The message. /// The cancellation token. - Task WriteAsync(string id, Message message, CT ct); + Task WriteAsync(string id, Message message, Ct ct); /// /// Reads the consent response message. @@ -25,7 +25,7 @@ public interface IConsentMessageStore /// The identifier. /// The cancellation token. /// - Task> ReadAsync(string id, CT ct); + Task> ReadAsync(string id, Ct ct); /// /// Deletes the consent response message. @@ -33,5 +33,5 @@ public interface IConsentMessageStore /// The identifier. /// The cancellation token. /// - Task DeleteAsync(string id, CT ct); + Task DeleteAsync(string id, Ct ct); } diff --git a/identity-server/src/IdentityServer/Stores/IMessageStore.cs b/identity-server/src/IdentityServer/Stores/IMessageStore.cs index ccb6c14c7..6501e5ea5 100644 --- a/identity-server/src/IdentityServer/Stores/IMessageStore.cs +++ b/identity-server/src/IdentityServer/Stores/IMessageStore.cs @@ -18,7 +18,7 @@ public interface IMessageStore /// The message. /// The cancellation token. /// An identifier for the message - Task WriteAsync(Message message, CT ct); + Task WriteAsync(Message message, Ct ct); /// /// Reads the message. @@ -26,5 +26,5 @@ public interface IMessageStore /// The identifier. /// The cancellation token. /// - Task> ReadAsync(string id, CT ct); + Task> ReadAsync(string id, Ct ct); } diff --git a/identity-server/src/IdentityServer/Stores/IServerSideTicketStore.cs b/identity-server/src/IdentityServer/Stores/IServerSideTicketStore.cs index 7c4ca04e3..ae8665227 100644 --- a/identity-server/src/IdentityServer/Stores/IServerSideTicketStore.cs +++ b/identity-server/src/IdentityServer/Stores/IServerSideTicketStore.cs @@ -19,19 +19,19 @@ public interface IServerSideTicketStore : ITicketStore /// /// The session filter. /// The cancellation token. - Task> GetSessionsAsync(SessionFilter filter, CT ct); + Task> GetSessionsAsync(SessionFilter filter, Ct ct); /// /// Queries user sessions based on filter /// /// The session query filter. /// The cancellation token. - Task> QuerySessionsAsync(SessionQuery filter, CT ct); + Task> QuerySessionsAsync(SessionQuery filter, Ct ct); /// /// Removes and returns expired sessions /// /// The maximum number of sessions to return. /// The cancellation token. - Task> GetAndRemoveExpiredSessionsAsync(int count, CT ct); + Task> GetAndRemoveExpiredSessionsAsync(int count, Ct ct); } diff --git a/identity-server/src/IdentityServer/Stores/ISigningCredentialStore.cs b/identity-server/src/IdentityServer/Stores/ISigningCredentialStore.cs index fdd4254a5..ca75885f6 100644 --- a/identity-server/src/IdentityServer/Stores/ISigningCredentialStore.cs +++ b/identity-server/src/IdentityServer/Stores/ISigningCredentialStore.cs @@ -16,5 +16,5 @@ public interface ISigningCredentialStore /// /// The cancellation token. /// - Task GetSigningCredentialsAsync(CT ct); + Task GetSigningCredentialsAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Stores/IValidationKeysStore.cs b/identity-server/src/IdentityServer/Stores/IValidationKeysStore.cs index 5185594d2..5e591823d 100644 --- a/identity-server/src/IdentityServer/Stores/IValidationKeysStore.cs +++ b/identity-server/src/IdentityServer/Stores/IValidationKeysStore.cs @@ -16,5 +16,5 @@ public interface IValidationKeysStore /// /// The cancellation token. /// - Task> GetValidationKeysAsync(CT ct); + Task> GetValidationKeysAsync(Ct ct); } diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryClientStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryClientStore.cs index 000a4e8ad..f0e9d681d 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryClientStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryClientStore.cs @@ -35,7 +35,7 @@ public class InMemoryClientStore : IClientStore /// /// The client /// - public Task FindClientByIdAsync(string clientId, CT _) + public Task FindClientByIdAsync(string clientId, Ct _) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryClientStore.FindClientById"); activity?.SetTag(Tracing.Properties.ClientId, clientId); @@ -49,7 +49,7 @@ public class InMemoryClientStore : IClientStore } /// - public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] CT _) + public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] Ct _) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryClientStore.GetAllClients"); diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryDeviceFlowStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryDeviceFlowStore.cs index 24f8bcd1b..b904fbef5 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryDeviceFlowStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryDeviceFlowStore.cs @@ -15,7 +15,7 @@ public class InMemoryDeviceFlowStore : IDeviceFlowStore private readonly List _repository = new List(); /// - public Task StoreDeviceAuthorizationAsync(string deviceCode, string userCode, DeviceCode data, CT _) + public Task StoreDeviceAuthorizationAsync(string deviceCode, string userCode, DeviceCode data, Ct _) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryDeviceFlowStore.StoreDeviceAuthorization"); @@ -28,7 +28,7 @@ public class InMemoryDeviceFlowStore : IDeviceFlowStore } /// - public Task FindByUserCodeAsync(string userCode, CT _) + public Task FindByUserCodeAsync(string userCode, Ct _) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryDeviceFlowStore.FindByUserCode"); @@ -43,7 +43,7 @@ public class InMemoryDeviceFlowStore : IDeviceFlowStore } /// - public Task FindByDeviceCodeAsync(string deviceCode, CT _) + public Task FindByDeviceCodeAsync(string deviceCode, Ct _) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryDeviceFlowStore.FindByDeviceCode"); @@ -58,7 +58,7 @@ public class InMemoryDeviceFlowStore : IDeviceFlowStore } /// - public Task UpdateByUserCodeAsync(string userCode, DeviceCode data, CT _) + public Task UpdateByUserCodeAsync(string userCode, DeviceCode data, Ct _) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryDeviceFlowStore.UpdateByUserCode"); @@ -76,7 +76,7 @@ public class InMemoryDeviceFlowStore : IDeviceFlowStore } /// - public Task RemoveByDeviceCodeAsync(string deviceCode, CT _) + public Task RemoveByDeviceCodeAsync(string deviceCode, Ct _) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryDeviceFlowStore.RemoveByDeviceCode"); diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPersistedGrantStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPersistedGrantStore.cs index d8f42ada3..21b92349f 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPersistedGrantStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPersistedGrantStore.cs @@ -16,7 +16,7 @@ public class InMemoryPersistedGrantStore : IPersistedGrantStore private readonly ConcurrentDictionary _repository = new ConcurrentDictionary(); /// - public Task StoreAsync(PersistedGrant grant, CT ct) + public Task StoreAsync(PersistedGrant grant, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPersistedGrantStoreResponseGenerator.Store"); @@ -26,7 +26,7 @@ public class InMemoryPersistedGrantStore : IPersistedGrantStore } /// - public Task GetAsync(string key, CT ct) + public Task GetAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPersistedGrantStoreResponseGenerator.Get"); @@ -39,7 +39,7 @@ public class InMemoryPersistedGrantStore : IPersistedGrantStore } /// - public Task> GetAllAsync(PersistedGrantFilter filter, CT ct) + public Task> GetAllAsync(PersistedGrantFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPersistedGrantStoreResponseGenerator.GetAll"); @@ -51,7 +51,7 @@ public class InMemoryPersistedGrantStore : IPersistedGrantStore } /// - public Task RemoveAsync(string key, CT ct) + public Task RemoveAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPersistedGrantStoreResponseGenerator.Remove"); @@ -61,7 +61,7 @@ public class InMemoryPersistedGrantStore : IPersistedGrantStore } /// - public Task RemoveAllAsync(PersistedGrantFilter filter, CT ct) + public Task RemoveAllAsync(PersistedGrantFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPersistedGrantStoreResponseGenerator.RemoveAll"); diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPushedAuthorizationRequestStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPushedAuthorizationRequestStore.cs index ccc7b541a..97062a127 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPushedAuthorizationRequestStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryPushedAuthorizationRequestStore.cs @@ -17,7 +17,7 @@ public class InMemoryPushedAuthorizationRequestStore : IPushedAuthorizationReque private readonly ConcurrentDictionary _repository = new ConcurrentDictionary(); /// - public Task StoreAsync(PushedAuthorizationRequest pushedAuthorizationRequest, CT ct) + public Task StoreAsync(PushedAuthorizationRequest pushedAuthorizationRequest, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPushedAuthorizationRequestStore.Store"); @@ -27,7 +27,7 @@ public class InMemoryPushedAuthorizationRequestStore : IPushedAuthorizationReque } /// - public Task GetByHashAsync(string referenceValueHash, CT ct) + public Task GetByHashAsync(string referenceValueHash, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPushedAuthorizationRequestStore.Get"); _repository.TryGetValue(referenceValueHash, out var request); @@ -36,7 +36,7 @@ public class InMemoryPushedAuthorizationRequestStore : IPushedAuthorizationReque } /// - public Task ConsumeByHashAsync(string referenceValueHash, CT ct) + public Task ConsumeByHashAsync(string referenceValueHash, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryPushedAuthorizationRequestStore.Remove"); _repository.TryRemove(referenceValueHash, out _); diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryResourcesStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryResourcesStore.cs index 74070c49e..c85e1df27 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryResourcesStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryResourcesStore.cs @@ -45,7 +45,7 @@ public class InMemoryResourcesStore : IResourceStore } /// - public Task GetAllResourcesAsync(CT ct) + public Task GetAllResourcesAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryResourceStore.GetAllResources"); @@ -54,7 +54,7 @@ public class InMemoryResourcesStore : IResourceStore } /// - public Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, CT ct) + public Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, Ct ct) { ArgumentNullException.ThrowIfNull(apiResourceNames); using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryResourceStore.FindApiResourcesByName"); @@ -67,7 +67,7 @@ public class InMemoryResourcesStore : IResourceStore } /// - public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) + public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) { ArgumentNullException.ThrowIfNull(scopeNames); using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryResourceStore.FindIdentityResourcesByScopeName"); @@ -81,7 +81,7 @@ public class InMemoryResourcesStore : IResourceStore } /// - public Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) + public Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) { ArgumentNullException.ThrowIfNull(scopeNames); using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryResourceStore.FindApiResourcesByScopeName"); @@ -95,7 +95,7 @@ public class InMemoryResourcesStore : IResourceStore } /// - public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, CT ct) + public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, Ct ct) { ArgumentNullException.ThrowIfNull(scopeNames); using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryResourceStore.FindApiScopesByName"); diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryServerSideSessionStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryServerSideSessionStore.cs index 19b81af55..f217424a3 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryServerSideSessionStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryServerSideSessionStore.cs @@ -18,7 +18,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore /// - public Task CreateSessionAsync(ServerSideSession session, CT ct) + public Task CreateSessionAsync(ServerSideSession session, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.CreateSession"); @@ -30,7 +30,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore } /// - public Task GetSessionAsync(string key, CT ct) + public Task GetSessionAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.GetSession"); @@ -39,7 +39,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore } /// - public Task UpdateSessionAsync(ServerSideSession session, CT ct) + public Task UpdateSessionAsync(ServerSideSession session, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.UpdateSession"); @@ -48,7 +48,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore } /// - public Task DeleteSessionAsync(string key, CT ct) + public Task DeleteSessionAsync(string key, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.DeleteSession"); @@ -59,7 +59,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore /// - public Task> GetSessionsAsync(SessionFilter filter, CT ct) + public Task> GetSessionsAsync(SessionFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.GetSessions"); @@ -80,7 +80,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore } /// - public Task DeleteSessionsAsync(SessionFilter filter, CT ct) + public Task DeleteSessionsAsync(SessionFilter filter, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.DeleteSessions"); @@ -108,7 +108,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore /// - public Task> GetAndRemoveExpiredSessionsAsync(int count, CT ct) + public Task> GetAndRemoveExpiredSessionsAsync(int count, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.GetAndRemoveExpiredSession"); @@ -129,7 +129,7 @@ public class InMemoryServerSideSessionStore : IServerSideSessionStore /// - public Task> QuerySessionsAsync(CT ct, SessionQuery filter = null) + public Task> QuerySessionsAsync(Ct ct, SessionQuery filter = null) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryServerSideSessionStore.QuerySessions"); diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemorySigningCredentialsStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemorySigningCredentialsStore.cs index 646baa44d..6c6cba8d7 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemorySigningCredentialsStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemorySigningCredentialsStore.cs @@ -24,7 +24,7 @@ public class InMemorySigningCredentialsStore : ISigningCredentialStore /// Gets the signing credentials. /// /// - public Task GetSigningCredentialsAsync(CT ct) + public Task GetSigningCredentialsAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemorySigningCredentialsStore.GetSigningCredentials"); diff --git a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryValidationKeysStore.cs b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryValidationKeysStore.cs index 88672b33c..e015a60cf 100644 --- a/identity-server/src/IdentityServer/Stores/InMemory/InMemoryValidationKeysStore.cs +++ b/identity-server/src/IdentityServer/Stores/InMemory/InMemoryValidationKeysStore.cs @@ -25,7 +25,7 @@ public class InMemoryValidationKeysStore : IValidationKeysStore /// Gets all validation keys. /// /// - public Task> GetValidationKeysAsync(CT ct) + public Task> GetValidationKeysAsync(Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("InMemoryValidationKeysStore.GetValidationKeys"); diff --git a/identity-server/src/IdentityServer/Stores/ValidatingClientStore.cs b/identity-server/src/IdentityServer/Stores/ValidatingClientStore.cs index 5778e2d98..a3099fa11 100644 --- a/identity-server/src/IdentityServer/Stores/ValidatingClientStore.cs +++ b/identity-server/src/IdentityServer/Stores/ValidatingClientStore.cs @@ -48,7 +48,7 @@ public class ValidatingClientStore : IClientStore /// /// The client or an InvalidOperationException /// - public async Task FindClientByIdAsync(string clientId, CT ct) + public async Task FindClientByIdAsync(string clientId, Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ValidatingClientStore.FindClientById"); @@ -81,7 +81,7 @@ public class ValidatingClientStore : IClientStore } /// - public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] CT ct) + public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] Ct ct) { using var activity = Tracing.StoreActivitySource.StartActivity("ValidatingClientStore.GetAllClients"); await foreach (var client in _inner.GetAllClientsAsync(ct)) diff --git a/identity-server/src/IdentityServer/Test/TestBackchannelLoginUserValidator.cs b/identity-server/src/IdentityServer/Test/TestBackchannelLoginUserValidator.cs index dbc819658..049e4ddd7 100644 --- a/identity-server/src/IdentityServer/Test/TestBackchannelLoginUserValidator.cs +++ b/identity-server/src/IdentityServer/Test/TestBackchannelLoginUserValidator.cs @@ -22,7 +22,7 @@ public class TestBackchannelLoginUserValidator : IBackchannelAuthenticationUserV public TestBackchannelLoginUserValidator(TestUserStore testUserStore) => _testUserStore = testUserStore; /// - public Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, CT ct) + public Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, Ct ct) { var result = new BackchannelAuthenticationUserValidationResult(); diff --git a/identity-server/src/IdentityServer/Test/TestUserProfileService.cs b/identity-server/src/IdentityServer/Test/TestUserProfileService.cs index 093895301..8eeca1a1f 100644 --- a/identity-server/src/IdentityServer/Test/TestUserProfileService.cs +++ b/identity-server/src/IdentityServer/Test/TestUserProfileService.cs @@ -42,7 +42,7 @@ public class TestUserProfileService : IProfileService /// The context. /// The cancellation token. /// - public virtual Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) + public virtual Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) { context.LogProfileRequest(Logger); @@ -67,7 +67,7 @@ public class TestUserProfileService : IProfileService /// The context. /// The cancellation token. /// - public virtual Task IsActiveAsync(IsActiveContext context, CT ct) + public virtual Task IsActiveAsync(IsActiveContext context, Ct ct) { Logger.LogDebug("IsActive called from: {caller}", context.Caller); diff --git a/identity-server/src/IdentityServer/Test/TestUserResourceOwnerPasswordValidator.cs b/identity-server/src/IdentityServer/Test/TestUserResourceOwnerPasswordValidator.cs index e0b833e1d..1f7c985b9 100644 --- a/identity-server/src/IdentityServer/Test/TestUserResourceOwnerPasswordValidator.cs +++ b/identity-server/src/IdentityServer/Test/TestUserResourceOwnerPasswordValidator.cs @@ -28,7 +28,7 @@ public class TestUserResourceOwnerPasswordValidator : IResourceOwnerPasswordVali } /// - public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, CT ct) + public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, Ct ct) { if (_users.ValidateCredentials(context.UserName, context.Password)) { diff --git a/identity-server/src/IdentityServer/Validation/Default/ApiSecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/ApiSecretValidator.cs index bd9f9e325..14ac2c949 100644 --- a/identity-server/src/IdentityServer/Validation/Default/ApiSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/ApiSecretValidator.cs @@ -45,7 +45,7 @@ public class ApiSecretValidator : IApiSecretValidator /// The cancellation token. /// /// - public async Task ValidateAsync(HttpContext context, CT ct) + public async Task ValidateAsync(HttpContext context, Ct ct) { using var activity = Tracing.ValidationActivitySource.StartActivity("ApiSecretValidator.Validate"); @@ -114,13 +114,13 @@ public class ApiSecretValidator : IApiSecretValidator return fail; } - private Task RaiseSuccessEventAsync(string clientId, string authMethod, CT ct) + private Task RaiseSuccessEventAsync(string clientId, string authMethod, Ct ct) { Telemetry.Metrics.ApiSecretValidation(clientId, authMethod); return _events.RaiseAsync(new ApiAuthenticationSuccessEvent(clientId, authMethod), ct); } - private Task RaiseFailureEventAsync(string clientId, string message, CT ct) + private Task RaiseFailureEventAsync(string clientId, string message, Ct ct) { Telemetry.Metrics.ApiSecretValidationFailure(clientId, message); return _events.RaiseAsync(new ApiAuthenticationFailureEvent(clientId, message), ct); diff --git a/identity-server/src/IdentityServer/Validation/Default/AuthorizeRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/AuthorizeRequestValidator.cs index 688895986..1dff3cd32 100644 --- a/identity-server/src/IdentityServer/Validation/Default/AuthorizeRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/AuthorizeRequestValidator.cs @@ -68,7 +68,7 @@ internal class AuthorizeRequestValidator : IAuthorizeRequestValidator public async Task ValidateAsync( NameValueCollection parameters, - CT ct, + Ct ct, ClaimsPrincipal? subject = null, AuthorizeRequestType authorizeRequestType = AuthorizeRequestType.Authorize) { @@ -196,7 +196,7 @@ internal class AuthorizeRequestValidator : IAuthorizeRequestValidator return Valid(request); } - private async Task LoadClientAsync(ValidatedAuthorizeRequest request, CT ct) + private async Task LoadClientAsync(ValidatedAuthorizeRequest request, Ct ct) { ////////////////////////////////////////////////////////// // client_id must be present @@ -226,7 +226,7 @@ internal class AuthorizeRequestValidator : IAuthorizeRequestValidator return Valid(request); } - private async Task ValidateClientAsync(ValidatedAuthorizeRequest request, CT ct) + private async Task ValidateClientAsync(ValidatedAuthorizeRequest request, Ct ct) { ////////////////////////////////////////////////////////// // check request object requirement @@ -475,7 +475,7 @@ internal class AuthorizeRequestValidator : IAuthorizeRequestValidator return Valid(request); } - private async Task ValidateScopeAndResourceAsync(ValidatedAuthorizeRequest request, CT ct) + private async Task ValidateScopeAndResourceAsync(ValidatedAuthorizeRequest request, Ct ct) { ////////////////////////////////////////////////////////// // scope must be present @@ -617,7 +617,7 @@ internal class AuthorizeRequestValidator : IAuthorizeRequestValidator return Valid(request); } - private async Task ValidateOptionalParametersAsync(ValidatedAuthorizeRequest request, CT ct) + private async Task ValidateOptionalParametersAsync(ValidatedAuthorizeRequest request, Ct ct) { ////////////////////////////////////////////////////////// // check nonce diff --git a/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestIdValidator.cs b/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestIdValidator.cs index 6b2d147b1..620a39616 100644 --- a/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestIdValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestIdValidator.cs @@ -37,7 +37,7 @@ internal class BackchannelAuthenticationRequestIdValidator : IBackchannelAuthent } /// - public async Task ValidateAsync(BackchannelAuthenticationRequestIdValidationContext context, CT ct) + public async Task ValidateAsync(BackchannelAuthenticationRequestIdValidationContext context, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("BackchannelAuthenticationRequestIdValidator.Validate"); diff --git a/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestValidator.cs index 702aa9f7e..9e9620293 100644 --- a/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/BackchannelAuthenticationRequestValidator.cs @@ -47,7 +47,7 @@ internal class BackchannelAuthenticationRequestValidator : IBackchannelAuthentic _licenseUsage = licenseUsage; } - public async Task ValidateRequestAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, CT ct) + public async Task ValidateRequestAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("BackchannelAuthenticationRequestValidator.ValidateRequest"); @@ -451,7 +451,7 @@ internal class BackchannelAuthenticationRequestValidator : IBackchannelAuthentic return result; } - private async Task<(bool Success, BackchannelAuthenticationRequestValidationResult ErrorResult)> TryValidateRequestObjectAsync(CT ct) + private async Task<(bool Success, BackchannelAuthenticationRequestValidationResult ErrorResult)> TryValidateRequestObjectAsync(Ct ct) { ////////////////////////////////////////////////////////// // validate request object diff --git a/identity-server/src/IdentityServer/Validation/Default/BasicAuthenticationSecretParser.cs b/identity-server/src/IdentityServer/Validation/Default/BasicAuthenticationSecretParser.cs index 6c8152c32..aa2166c10 100644 --- a/identity-server/src/IdentityServer/Validation/Default/BasicAuthenticationSecretParser.cs +++ b/identity-server/src/IdentityServer/Validation/Default/BasicAuthenticationSecretParser.cs @@ -46,7 +46,7 @@ public class BasicAuthenticationSecretParser : ISecretParser /// A parsed secret /// /// - public Task ParseAsync(HttpContext context, CT ct) + public Task ParseAsync(HttpContext context, Ct ct) { _logger.LogDebug("Start parsing Basic Authentication secret"); diff --git a/identity-server/src/IdentityServer/Validation/Default/ClientSecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/ClientSecretValidator.cs index a15306f48..79ef0105f 100644 --- a/identity-server/src/IdentityServer/Validation/Default/ClientSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/ClientSecretValidator.cs @@ -40,7 +40,7 @@ public class ClientSecretValidator : IClientSecretValidator } /// - public async Task ValidateAsync(HttpContext context, CT ct) + public async Task ValidateAsync(HttpContext context, Ct ct) { using var activity = Tracing.ValidationActivitySource.StartActivity("ClientSecretValidator.Validate"); @@ -104,13 +104,13 @@ public class ClientSecretValidator : IClientSecretValidator return success; } - private Task RaiseSuccessEventAsync(string clientId, string authMethod, CT ct) + private Task RaiseSuccessEventAsync(string clientId, string authMethod, Ct ct) { Telemetry.Metrics.ClientSecretValidation(clientId, authMethod); return _events.RaiseAsync(new ClientAuthenticationSuccessEvent(clientId, authMethod), ct); } - private Task RaiseFailureEventAsync(string clientId, string message, CT ct) + private Task RaiseFailureEventAsync(string clientId, string message, Ct ct) { Telemetry.Metrics.ClientSecretValidationFailure(clientId, message); return _events.RaiseAsync(new ClientAuthenticationFailureEvent(clientId, message), ct); diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultClientConfigurationValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultClientConfigurationValidator.cs index 3c9bbc134..339ea7d70 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultClientConfigurationValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultClientConfigurationValidator.cs @@ -27,7 +27,7 @@ public class DefaultClientConfigurationValidator : IClientConfigurationValidator /// The context. /// The cancellation token. /// - public async Task ValidateAsync(ClientConfigurationValidationContext context, CT ct) + public async Task ValidateAsync(ClientConfigurationValidationContext context, Ct ct) { using var activity = Tracing.ValidationActivitySource.StartActivity("DefaultClientConfigurationValidator.Validate"); diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomAuthorizeRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomAuthorizeRequestValidator.cs index e81ec0efd..7b708ff86 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomAuthorizeRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomAuthorizeRequestValidator.cs @@ -15,5 +15,5 @@ internal class DefaultCustomAuthorizeRequestValidator : ICustomAuthorizeRequestV /// The context. /// The cancellation token. /// - public Task ValidateAsync(CustomAuthorizeRequestValidationContext context, CT ct) => Task.CompletedTask; + public Task ValidateAsync(CustomAuthorizeRequestValidationContext context, Ct ct) => Task.CompletedTask; } diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomBackchannelAuthenticationValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomBackchannelAuthenticationValidator.cs index 15fa35dbb..f3a42427d 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomBackchannelAuthenticationValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomBackchannelAuthenticationValidator.cs @@ -12,5 +12,5 @@ public class DefaultCustomBackchannelAuthenticationValidator : ICustomBackchanne { /// /// - public Task ValidateAsync(CustomBackchannelAuthenticationRequestValidationContext customValidationContext, CT ct) => Task.CompletedTask; + public Task ValidateAsync(CustomBackchannelAuthenticationRequestValidationContext customValidationContext, Ct ct) => Task.CompletedTask; } diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenRequestValidator.cs index 9882bb14e..7c497d024 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenRequestValidator.cs @@ -18,5 +18,5 @@ internal class DefaultCustomTokenRequestValidator : ICustomTokenRequestValidator /// The validation result /// /// - public Task ValidateAsync(CustomTokenRequestValidationContext context, CT ct) => Task.CompletedTask; + public Task ValidateAsync(CustomTokenRequestValidationContext context, Ct ct) => Task.CompletedTask; } diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenValidator.cs index a1b41c747..c3ad8befb 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultCustomTokenValidator.cs @@ -37,8 +37,8 @@ public class DefaultCustomTokenValidator : ICustomTokenValidator /// The validation result /// /// - public virtual Task ValidateAccessTokenAsync(TokenValidationResult result, CT ct) => Task.FromResult(result); + public virtual Task ValidateAccessTokenAsync(TokenValidationResult result, Ct ct) => Task.FromResult(result); /// - public virtual Task ValidateIdentityTokenAsync(TokenValidationResult result, CT ct) => Task.FromResult(result); + public virtual Task ValidateIdentityTokenAsync(TokenValidationResult result, Ct ct) => Task.FromResult(result); } diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultDPoPProofValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultDPoPProofValidator.cs index 47bfb4d36..c5eac04d0 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultDPoPProofValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultDPoPProofValidator.cs @@ -69,7 +69,7 @@ public class DefaultDPoPProofValidator : IDPoPProofValidator } /// - public async Task ValidateAsync(DPoPProofValidatonContext context, CT ct) + public async Task ValidateAsync(DPoPProofValidatonContext context, Ct ct) { var result = new DPoPProofValidatonResult() { IsError = false }; @@ -284,7 +284,7 @@ public class DefaultDPoPProofValidator : IDPoPProofValidator /// /// Validates the payload. /// - protected virtual async Task ValidatePayloadAsync(DPoPProofValidatonContext context, DPoPProofValidatonResult result, CT ct) + protected virtual async Task ValidatePayloadAsync(DPoPProofValidatonContext context, DPoPProofValidatonResult result, Ct ct) { if (context.ValidateAccessToken) { @@ -381,7 +381,7 @@ public class DefaultDPoPProofValidator : IDPoPProofValidator /// /// Validates is the token has been replayed. /// - protected virtual async Task ValidateReplayAsync(DPoPProofValidatonContext context, DPoPProofValidatonResult result, CT ct) + protected virtual async Task ValidateReplayAsync(DPoPProofValidatonContext context, DPoPProofValidatonResult result, Ct ct) { if (await ReplayCache.ExistsAsync(ReplayCachePurpose, result.TokenId, ct)) { diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultIdentityProviderConfigurationValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultIdentityProviderConfigurationValidator.cs index 519485c36..87c8e658f 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultIdentityProviderConfigurationValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultIdentityProviderConfigurationValidator.cs @@ -21,7 +21,7 @@ public class DefaultIdentityProviderConfigurationValidator : IIdentityProviderCo public DefaultIdentityProviderConfigurationValidator(IdentityServerOptions options) => _options = options; /// - public virtual async Task ValidateAsync(IdentityProviderConfigurationValidationContext context, CT ct) + public virtual async Task ValidateAsync(IdentityProviderConfigurationValidationContext context, Ct ct) { using var activity = Tracing.ValidationActivitySource.StartActivity("DefaultIdentityProviderConfigurationValidator.Validate"); diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultIssuerPathValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultIssuerPathValidator.cs index 522397cc8..03afbea36 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultIssuerPathValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultIssuerPathValidator.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.Validation; public class DefaultIssuerPathValidator(IIssuerNameService issuerNameService, ILogger logger) : IIssuerPathValidator { - public async Task ValidateAsync(string path, CT ct) + public async Task ValidateAsync(string path, Ct ct) { //if there is no path, this is fine since the default issuer is probably being used if (path.IsMissing()) diff --git a/identity-server/src/IdentityServer/Validation/Default/DefaultResourceValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DefaultResourceValidator.cs index 1696607e4..87edd408a 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DefaultResourceValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DefaultResourceValidator.cs @@ -32,7 +32,7 @@ public class DefaultResourceValidator : IResourceValidator } /// - public virtual async Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, CT ct) + public virtual async Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, Ct ct) { ArgumentNullException.ThrowIfNull(request); using var activity = Tracing.ValidationActivitySource.StartActivity("DefaultResourceValidator.ValidateRequestedResources"); diff --git a/identity-server/src/IdentityServer/Validation/Default/DeviceAuthorizationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DeviceAuthorizationRequestValidator.cs index e9b0949de..f3a470d7b 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DeviceAuthorizationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DeviceAuthorizationRequestValidator.cs @@ -28,7 +28,7 @@ internal class DeviceAuthorizationRequestValidator : IDeviceAuthorizationRequest _logger = logger; } - public async Task ValidateAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, CT ct) + public async Task ValidateAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("DeviceAuthorizationRequestValidator.Validate"); @@ -101,7 +101,7 @@ internal class DeviceAuthorizationRequestValidator : IDeviceAuthorizationRequest return Valid(request); } - private async Task ValidateScopeAsync(ValidatedDeviceAuthorizationRequest request, CT ct) + private async Task ValidateScopeAsync(ValidatedDeviceAuthorizationRequest request, Ct ct) { ////////////////////////////////////////////////////////// // scope must be present diff --git a/identity-server/src/IdentityServer/Validation/Default/DeviceCodeValidator.cs b/identity-server/src/IdentityServer/Validation/Default/DeviceCodeValidator.cs index 8b22af02b..b435b4af5 100644 --- a/identity-server/src/IdentityServer/Validation/Default/DeviceCodeValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/DeviceCodeValidator.cs @@ -49,7 +49,7 @@ internal class DeviceCodeValidator : IDeviceCodeValidator /// The context. /// The cancellation token. /// - public async Task ValidateAsync(DeviceCodeValidationContext context, CT ct) + public async Task ValidateAsync(DeviceCodeValidationContext context, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("DeviceCodeValidator.Validate"); diff --git a/identity-server/src/IdentityServer/Validation/Default/EndSessionRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/EndSessionRequestValidator.cs index dc755bf03..6b8e10e06 100644 --- a/identity-server/src/IdentityServer/Validation/Default/EndSessionRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/EndSessionRequestValidator.cs @@ -84,7 +84,7 @@ public class EndSessionRequestValidator : IEndSessionRequestValidator } /// - public async Task ValidateAsync(NameValueCollection parameters, ClaimsPrincipal subject, CT ct) + public async Task ValidateAsync(NameValueCollection parameters, ClaimsPrincipal subject, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("EndSessionRequestValidator.Validate"); @@ -222,7 +222,7 @@ public class EndSessionRequestValidator : IEndSessionRequestValidator } /// - public async Task ValidateCallbackAsync(NameValueCollection parameters, CT ct) + public async Task ValidateCallbackAsync(NameValueCollection parameters, Ct ct) { var result = new EndSessionCallbackValidationResult { diff --git a/identity-server/src/IdentityServer/Validation/Default/ExtensionGrantValidator.cs b/identity-server/src/IdentityServer/Validation/Default/ExtensionGrantValidator.cs index ca5e00da6..7c59b39c4 100644 --- a/identity-server/src/IdentityServer/Validation/Default/ExtensionGrantValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/ExtensionGrantValidator.cs @@ -46,7 +46,7 @@ public class ExtensionGrantValidator /// The request. /// The cancellation token. /// - public async Task ValidateAsync(ValidatedTokenRequest request, CT ct) + public async Task ValidateAsync(ValidatedTokenRequest request, Ct ct) { var validator = _validators.FirstOrDefault(v => v.GrantType.Equals(request.GrantType, StringComparison.Ordinal)); diff --git a/identity-server/src/IdentityServer/Validation/Default/HashedSharedSecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/HashedSharedSecretValidator.cs index a498e743e..516936770 100644 --- a/identity-server/src/IdentityServer/Validation/Default/HashedSharedSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/HashedSharedSecretValidator.cs @@ -33,7 +33,7 @@ public class HashedSharedSecretValidator : ISecretValidator /// /// Id or credential /// - public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct) + public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct) { var fail = Task.FromResult(new SecretValidationResult { Success = false }); var success = Task.FromResult(new SecretValidationResult { Success = true }); diff --git a/identity-server/src/IdentityServer/Validation/Default/IntrospectionRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/IntrospectionRequestValidator.cs index b51c60dad..6ff85be09 100644 --- a/identity-server/src/IdentityServer/Validation/Default/IntrospectionRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/IntrospectionRequestValidator.cs @@ -37,7 +37,7 @@ internal class IntrospectionRequestValidator : IIntrospectionRequestValidator } /// - public async Task ValidateAsync(IntrospectionRequestValidationContext context, CT ct) + public async Task ValidateAsync(IntrospectionRequestValidationContext context, Ct ct) { var parameters = context.Parameters; var api = context.Api; @@ -181,7 +181,7 @@ internal class IntrospectionRequestValidator : IIntrospectionRequestValidator /// /// Attempt to obtain the claims for a token as a refresh token for a client. /// - private async Task> GetRefreshTokenClaimsAsync(string token, Client client, CT ct) + private async Task> GetRefreshTokenClaimsAsync(string token, Client client, Ct ct) { var refreshValidationResult = await _refreshTokenService.ValidateRefreshTokenAsync(token, client, ct); if (!refreshValidationResult.IsError) @@ -210,7 +210,7 @@ internal class IntrospectionRequestValidator : IIntrospectionRequestValidator /// /// Attempt to obtain the claims for a token as an access token, and validate that it belongs to the client. /// - private async Task> GetAccessTokenClaimsAsync(string token, Client client, CT ct) + private async Task> GetAccessTokenClaimsAsync(string token, Client client, Ct ct) { var tokenValidationResult = await _tokenValidator.ValidateAccessTokenAsync(token, null, ct); if (!tokenValidationResult.IsError) @@ -234,7 +234,7 @@ internal class IntrospectionRequestValidator : IIntrospectionRequestValidator /// token belongs to a particular client, and is intended for use when we have an API caller (any API can /// introspect a token). /// - private async Task> GetAccessTokenClaimsAsync(string token, CT ct) + private async Task> GetAccessTokenClaimsAsync(string token, Ct ct) { var tokenValidationResult = await _tokenValidator.ValidateAccessTokenAsync(token, null, ct); if (!tokenValidationResult.IsError) diff --git a/identity-server/src/IdentityServer/Validation/Default/JwtBearerClientAssertionSecretParser.cs b/identity-server/src/IdentityServer/Validation/Default/JwtBearerClientAssertionSecretParser.cs index ef4479c3a..85519abef 100644 --- a/identity-server/src/IdentityServer/Validation/Default/JwtBearerClientAssertionSecretParser.cs +++ b/identity-server/src/IdentityServer/Validation/Default/JwtBearerClientAssertionSecretParser.cs @@ -49,7 +49,7 @@ public class JwtBearerClientAssertionSecretParser : ISecretParser /// A parsed secret /// /// - public async Task ParseAsync(HttpContext context, CT ct) + public async Task ParseAsync(HttpContext context, Ct ct) { _logger.LogDebug("Start parsing for JWT client assertion in post body"); diff --git a/identity-server/src/IdentityServer/Validation/Default/JwtRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/JwtRequestValidator.cs index 896a39187..c66c79c47 100644 --- a/identity-server/src/IdentityServer/Validation/Default/JwtRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/JwtRequestValidator.cs @@ -29,7 +29,7 @@ public class JwtRequestValidator : IJwtRequestValidator /// /// The audience URI to use /// - protected async Task GetAudienceUri(CT ct) + protected async Task GetAudienceUri(Ct ct) { if (_audienceUri.IsPresent()) { @@ -82,7 +82,7 @@ public class JwtRequestValidator : IJwtRequestValidator } /// - public virtual async Task ValidateAsync(JwtRequestValidationContext context, CT ct) + public virtual async Task ValidateAsync(JwtRequestValidationContext context, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("JwtRequestValidator.Validate"); @@ -156,7 +156,7 @@ public class JwtRequestValidator : IJwtRequestValidator /// /// Validates the JWT token /// - protected virtual async Task ValidateJwtAsync(JwtRequestValidationContext context, IEnumerable keys, CT ct) + protected virtual async Task ValidateJwtAsync(JwtRequestValidationContext context, IEnumerable keys, Ct ct) { var tokenValidationParameters = new TokenValidationParameters { diff --git a/identity-server/src/IdentityServer/Validation/Default/MutualTlsSecretParser.cs b/identity-server/src/IdentityServer/Validation/Default/MutualTlsSecretParser.cs index 7c8c89434..116a81fb9 100644 --- a/identity-server/src/IdentityServer/Validation/Default/MutualTlsSecretParser.cs +++ b/identity-server/src/IdentityServer/Validation/Default/MutualTlsSecretParser.cs @@ -41,7 +41,7 @@ public class MutualTlsSecretParser : ISecretParser /// The cancellation token. /// /// - public async Task ParseAsync(HttpContext context, CT ct) + public async Task ParseAsync(HttpContext context, Ct ct) { _logger.LogDebug("Start parsing for client id in post body"); diff --git a/identity-server/src/IdentityServer/Validation/Default/NopBackchannelAuthenticationUserValidator.cs b/identity-server/src/IdentityServer/Validation/Default/NopBackchannelAuthenticationUserValidator.cs index da7b8f1e6..22ebf6960 100644 --- a/identity-server/src/IdentityServer/Validation/Default/NopBackchannelAuthenticationUserValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/NopBackchannelAuthenticationUserValidator.cs @@ -12,7 +12,7 @@ namespace Duende.IdentityServer.Validation; public class NopBackchannelAuthenticationUserValidator : IBackchannelAuthenticationUserValidator { /// - public Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, CT ct) + public Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, Ct ct) { var result = new BackchannelAuthenticationUserValidationResult { diff --git a/identity-server/src/IdentityServer/Validation/Default/NopClientConfigurationValidator.cs b/identity-server/src/IdentityServer/Validation/Default/NopClientConfigurationValidator.cs index 663fd1f09..9d153d54f 100644 --- a/identity-server/src/IdentityServer/Validation/Default/NopClientConfigurationValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/NopClientConfigurationValidator.cs @@ -17,7 +17,7 @@ public class NopClientConfigurationValidator : IClientConfigurationValidator /// The cancellation token. /// /// - public Task ValidateAsync(ClientConfigurationValidationContext context, CT ct) + public Task ValidateAsync(ClientConfigurationValidationContext context, Ct ct) { context.IsValid = true; return Task.CompletedTask; diff --git a/identity-server/src/IdentityServer/Validation/Default/NotSupportedResouceOwnerCredentialValidator.cs b/identity-server/src/IdentityServer/Validation/Default/NotSupportedResouceOwnerCredentialValidator.cs index 19f126b7b..8d0ba41a3 100644 --- a/identity-server/src/IdentityServer/Validation/Default/NotSupportedResouceOwnerCredentialValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/NotSupportedResouceOwnerCredentialValidator.cs @@ -28,7 +28,7 @@ public class NotSupportedResourceOwnerPasswordValidator : IResourceOwnerPassword /// The cancellation token. /// /// - public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, CT ct) + public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, Ct ct) { context.Result = new GrantValidationResult(TokenRequestErrors.UnsupportedGrantType); diff --git a/identity-server/src/IdentityServer/Validation/Default/PlainTextSharedSecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/PlainTextSharedSecretValidator.cs index da890aec5..9f1a73b68 100644 --- a/identity-server/src/IdentityServer/Validation/Default/PlainTextSharedSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/PlainTextSharedSecretValidator.cs @@ -33,7 +33,7 @@ public class PlainTextSharedSecretValidator : ISecretValidator /// /// id or credential is missing. /// - public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct) + public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct) { var fail = Task.FromResult(new SecretValidationResult { Success = false }); var success = Task.FromResult(new SecretValidationResult { Success = true }); diff --git a/identity-server/src/IdentityServer/Validation/Default/PostBodySecretParser.cs b/identity-server/src/IdentityServer/Validation/Default/PostBodySecretParser.cs index e24e94b05..ab4326c4b 100644 --- a/identity-server/src/IdentityServer/Validation/Default/PostBodySecretParser.cs +++ b/identity-server/src/IdentityServer/Validation/Default/PostBodySecretParser.cs @@ -47,7 +47,7 @@ public class PostBodySecretParser : ISecretParser /// A parsed secret /// /// - public async Task ParseAsync(HttpContext context, CT ct) + public async Task ParseAsync(HttpContext context, Ct ct) { _logger.LogDebug("Start parsing for secret in post body"); diff --git a/identity-server/src/IdentityServer/Validation/Default/PrivateKeyJwtSecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/PrivateKeyJwtSecretValidator.cs index 418d981e6..cb43cdfe2 100644 --- a/identity-server/src/IdentityServer/Validation/Default/PrivateKeyJwtSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/PrivateKeyJwtSecretValidator.cs @@ -54,7 +54,7 @@ public class PrivateKeyJwtSecretValidator : ISecretValidator /// /// ParsedSecret.Credential is not a JWT token /// - public async Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct) + public async Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct) { var fail = new SecretValidationResult { Success = false }; var success = new SecretValidationResult { Success = true }; diff --git a/identity-server/src/IdentityServer/Validation/Default/PushedAuthorizationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/PushedAuthorizationRequestValidator.cs index 8ccbf387a..0bcc4c230 100644 --- a/identity-server/src/IdentityServer/Validation/Default/PushedAuthorizationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/PushedAuthorizationRequestValidator.cs @@ -44,7 +44,7 @@ internal class PushedAuthorizationRequestValidator( IMtlsEndpointGenerator mtlsEndpointGenerator, ILogger logger) : IPushedAuthorizationRequestValidator { - public async Task ValidateAsync(PushedAuthorizationRequestValidationContext context, CT ct) + public async Task ValidateAsync(PushedAuthorizationRequestValidationContext context, Ct ct) { // Licensing licenseUsage.FeatureUsed(LicenseFeature.PAR); diff --git a/identity-server/src/IdentityServer/Validation/Default/RequestObjectValidator.cs b/identity-server/src/IdentityServer/Validation/Default/RequestObjectValidator.cs index f72c4016e..706e7e5f5 100644 --- a/identity-server/src/IdentityServer/Validation/Default/RequestObjectValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/RequestObjectValidator.cs @@ -36,7 +36,7 @@ internal class RequestObjectValidator : IRequestObjectValidator } - public async Task LoadRequestObjectAsync(ValidatedAuthorizeRequest request, CT ct) + public async Task LoadRequestObjectAsync(ValidatedAuthorizeRequest request, Ct ct) { var requestObject = request.Raw.Get(OidcConstants.AuthorizeRequest.Request); var requestUri = request.Raw.Get(OidcConstants.AuthorizeRequest.RequestUri); @@ -116,7 +116,7 @@ internal class RequestObjectValidator : IRequestObjectValidator private static string? LoadRequestObjectFromPushedAuthorizationRequest(ValidatedAuthorizeRequest request) => request.Raw.Get(OidcConstants.AuthorizeRequest.Request); - public async Task ValidatePushedAuthorizationRequest(ValidatedAuthorizeRequest request, CT ct) + public async Task ValidatePushedAuthorizationRequest(ValidatedAuthorizeRequest request, Ct ct) { // Check that the endpoint is still enabled at the time of validation, in case an existing PAR record // is used after PAR is disabled. @@ -193,7 +193,7 @@ internal class RequestObjectValidator : IRequestObjectValidator return null; } - private async Task GetPushedAuthorizationRequestAsync(ValidatedAuthorizeRequest request, CT ct) + private async Task GetPushedAuthorizationRequestAsync(ValidatedAuthorizeRequest request, Ct ct) { var referenceValue = GetReferenceValue(request); if (referenceValue != null) @@ -217,7 +217,7 @@ internal class RequestObjectValidator : IRequestObjectValidator return null; } - public async Task ValidateRequestObjectAsync(ValidatedAuthorizeRequest request, CT ct) + public async Task ValidateRequestObjectAsync(ValidatedAuthorizeRequest request, Ct ct) { ////////////////////////////////////////////////////////// // validate request object diff --git a/identity-server/src/IdentityServer/Validation/Default/SecretParser.cs b/identity-server/src/IdentityServer/Validation/Default/SecretParser.cs index 89e56695e..cdf43eaec 100644 --- a/identity-server/src/IdentityServer/Validation/Default/SecretParser.cs +++ b/identity-server/src/IdentityServer/Validation/Default/SecretParser.cs @@ -34,7 +34,7 @@ public class SecretParser : ISecretsListParser /// The cancellation token. /// /// - public async Task ParseAsync(HttpContext context, CT ct) + public async Task ParseAsync(HttpContext context, Ct ct) { // see if a registered parser finds a secret on the request ParsedSecret bestSecret = null; diff --git a/identity-server/src/IdentityServer/Validation/Default/SecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/SecretValidator.cs index 9bc2eca92..9d9a0274f 100644 --- a/identity-server/src/IdentityServer/Validation/Default/SecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/SecretValidator.cs @@ -38,7 +38,7 @@ public class SecretValidator : ISecretsListValidator /// The cancellation token. /// /// - public async Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct) + public async Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct) { var secretsArray = secrets as Secret[] ?? secrets.ToArray(); diff --git a/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidator.cs b/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidator.cs index affdcd025..d8bc1ca16 100644 --- a/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidator.cs @@ -59,7 +59,7 @@ public class StrictRedirectUriValidator : IRedirectUriValidator /// /// true is the URI is valid; false otherwise. /// - public virtual Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, CT ct) => Task.FromResult(StringCollectionContainsString(client.PostLogoutRedirectUris, requestedUri)); + public virtual Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, Ct ct) => Task.FromResult(StringCollectionContainsString(client.PostLogoutRedirectUris, requestedUri)); /// /// Determines whether a redirect uri is valid for a context. @@ -69,7 +69,7 @@ public class StrictRedirectUriValidator : IRedirectUriValidator /// /// true is the URI is valid; false otherwise. /// - public virtual Task IsRedirectUriValidAsync(RedirectUriValidationContext context, CT ct) + public virtual Task IsRedirectUriValidAsync(RedirectUriValidationContext context, Ct ct) { // Check if special case handling for PAR is enabled and that the client // is a confidential client. If so, any pushed redirect uri is allowed diff --git a/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidatorAppAuth.cs b/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidatorAppAuth.cs index 7baee22bb..ffab440f7 100644 --- a/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidatorAppAuth.cs +++ b/identity-server/src/IdentityServer/Validation/Default/StrictRedirectUriValidatorAppAuth.cs @@ -27,7 +27,7 @@ public class StrictRedirectUriValidatorAppAuth : StrictRedirectUriValidator : base(options) => _logger = logger; /// - public override async Task IsRedirectUriValidAsync(RedirectUriValidationContext context, CT ct) + public override async Task IsRedirectUriValidAsync(RedirectUriValidationContext context, Ct ct) { var isAllowed = await base.IsRedirectUriValidAsync(context, ct); if (isAllowed) @@ -53,7 +53,7 @@ public class StrictRedirectUriValidatorAppAuth : StrictRedirectUriValidator /// /// true is the URI is valid; false otherwise. /// - public override async Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, CT ct) + public override async Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, Ct ct) { var isAllowed = await base.IsPostLogoutRedirectUriValidAsync(requestedUri, client, ct); if (isAllowed) diff --git a/identity-server/src/IdentityServer/Validation/Default/TokenRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/TokenRequestValidator.cs index fbec2a308..2ae3cf134 100644 --- a/identity-server/src/IdentityServer/Validation/Default/TokenRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/TokenRequestValidator.cs @@ -45,7 +45,7 @@ internal class TokenRequestValidator : ITokenRequestValidator private readonly ILogger _logger; private ValidatedTokenRequest _validatedRequest; - private CT _ct; + private Ct _ct; public TokenRequestValidator( IdentityServerOptions options, @@ -102,7 +102,7 @@ internal class TokenRequestValidator : ITokenRequestValidator }, CancellationToken.None); /// - public async Task ValidateRequestAsync(TokenRequestValidationContext context, CT ct) + public async Task ValidateRequestAsync(TokenRequestValidationContext context, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenRequestValidator.ValidateRequest"); diff --git a/identity-server/src/IdentityServer/Validation/Default/TokenRevocationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/TokenRevocationRequestValidator.cs index b791713a3..253a1e7b0 100644 --- a/identity-server/src/IdentityServer/Validation/Default/TokenRevocationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/TokenRevocationRequestValidator.cs @@ -37,7 +37,7 @@ internal class TokenRevocationRequestValidator : ITokenRevocationRequestValidato /// /// The cancellation token. /// - public Task ValidateRequestAsync(NameValueCollection parameters, Client client, CT ct) + public Task ValidateRequestAsync(NameValueCollection parameters, Client client, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenRevocationRequestValidator.ValidateRequest"); diff --git a/identity-server/src/IdentityServer/Validation/Default/TokenValidator.cs b/identity-server/src/IdentityServer/Validation/Default/TokenValidator.cs index e713b1c78..fdb79222a 100644 --- a/identity-server/src/IdentityServer/Validation/Default/TokenValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/TokenValidator.cs @@ -58,7 +58,7 @@ internal class TokenValidator : ITokenValidator _log = new TokenValidationLog(); } - public async Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, CT ct) + public async Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenValidator.ValidateIdentityToken"); @@ -120,7 +120,7 @@ internal class TokenValidator : ITokenValidator return customResult; } - public async Task ValidateAccessTokenAsync(string token, string expectedScope, CT ct) + public async Task ValidateAccessTokenAsync(string token, string expectedScope, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenValidator.ValidateAccessToken"); @@ -269,7 +269,7 @@ internal class TokenValidator : ITokenValidator } private async Task ValidateJwtAsync(string jwtString, - IEnumerable validationKeys, CT ct, bool validateLifetime = true, string audience = null) + IEnumerable validationKeys, Ct ct, bool validateLifetime = true, string audience = null) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenValidator.ValidateJwt"); @@ -366,7 +366,7 @@ internal class TokenValidator : ITokenValidator }; } - private async Task ValidateReferenceAccessTokenAsync(string tokenHandle, CT ct) + private async Task ValidateReferenceAccessTokenAsync(string tokenHandle, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("TokenValidator.ValidateReferenceAccessToken"); diff --git a/identity-server/src/IdentityServer/Validation/Default/UserInfoRequestValidator.cs b/identity-server/src/IdentityServer/Validation/Default/UserInfoRequestValidator.cs index afa66f061..4911d31ce 100644 --- a/identity-server/src/IdentityServer/Validation/Default/UserInfoRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/UserInfoRequestValidator.cs @@ -49,7 +49,7 @@ internal class UserInfoRequestValidator : IUserInfoRequestValidator /// The cancellation token. /// /// - public async Task ValidateRequestAsync(string accessToken, CT ct) + public async Task ValidateRequestAsync(string accessToken, Ct ct) { using var activity = Tracing.BasicActivitySource.StartActivity("UserInfoRequestValidator.ValidateRequest"); diff --git a/identity-server/src/IdentityServer/Validation/Default/X509NameSecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/X509NameSecretValidator.cs index 12d7b9e60..29ec423c7 100644 --- a/identity-server/src/IdentityServer/Validation/Default/X509NameSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/X509NameSecretValidator.cs @@ -24,7 +24,7 @@ public class X509NameSecretValidator : ISecretValidator /// /// - public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct) + public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct) { var fail = Task.FromResult(new SecretValidationResult { Success = false }); diff --git a/identity-server/src/IdentityServer/Validation/Default/X509ThumbprintSecretValidator.cs b/identity-server/src/IdentityServer/Validation/Default/X509ThumbprintSecretValidator.cs index 967c4737d..9d772e338 100644 --- a/identity-server/src/IdentityServer/Validation/Default/X509ThumbprintSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/Default/X509ThumbprintSecretValidator.cs @@ -24,7 +24,7 @@ public class X509ThumbprintSecretValidator : ISecretValidator /// /// - public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct) + public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct) { var fail = Task.FromResult(new SecretValidationResult { Success = false }); diff --git a/identity-server/src/IdentityServer/Validation/IApiSecretValidator.cs b/identity-server/src/IdentityServer/Validation/IApiSecretValidator.cs index ab8f9de0c..478995c5d 100644 --- a/identity-server/src/IdentityServer/Validation/IApiSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IApiSecretValidator.cs @@ -19,5 +19,5 @@ public interface IApiSecretValidator /// The context. /// The cancellation token. /// - Task ValidateAsync(HttpContext context, CT ct); + Task ValidateAsync(HttpContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IAuthorizeRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IAuthorizeRequestValidator.cs index 520ae18cb..a47f73a9e 100644 --- a/identity-server/src/IdentityServer/Validation/IAuthorizeRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IAuthorizeRequestValidator.cs @@ -21,5 +21,5 @@ public interface IAuthorizeRequestValidator /// /// /// - Task ValidateAsync(NameValueCollection parameters, CT ct, ClaimsPrincipal? subject = null, AuthorizeRequestType authorizeRequestType = AuthorizeRequestType.Authorize); + Task ValidateAsync(NameValueCollection parameters, Ct ct, ClaimsPrincipal? subject = null, AuthorizeRequestType authorizeRequestType = AuthorizeRequestType.Authorize); } diff --git a/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestIdValidator.cs b/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestIdValidator.cs index 8ad07b50a..3d1ee893e 100644 --- a/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestIdValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestIdValidator.cs @@ -15,5 +15,5 @@ public interface IBackchannelAuthenticationRequestIdValidator /// The context. /// The cancellation token. /// - Task ValidateAsync(BackchannelAuthenticationRequestIdValidationContext context, CT ct); + Task ValidateAsync(BackchannelAuthenticationRequestIdValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestValidator.cs index ca598c45e..e78fb38b0 100644 --- a/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationRequestValidator.cs @@ -18,5 +18,5 @@ public interface IBackchannelAuthenticationRequestValidator /// The client validation result. /// The cancellation token. /// - Task ValidateRequestAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, CT ct); + Task ValidateRequestAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationUserValidator.cs b/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationUserValidator.cs index bf12612be..063fc5aaa 100644 --- a/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationUserValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IBackchannelAuthenticationUserValidator.cs @@ -17,5 +17,5 @@ public interface IBackchannelAuthenticationUserValidator /// /// The cancellation token. /// - Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, CT ct); + Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IClientConfigurationValidator.cs b/identity-server/src/IdentityServer/Validation/IClientConfigurationValidator.cs index 94dd88624..3d1d659f7 100644 --- a/identity-server/src/IdentityServer/Validation/IClientConfigurationValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IClientConfigurationValidator.cs @@ -17,5 +17,5 @@ public interface IClientConfigurationValidator /// The context. /// The cancellation token. /// - Task ValidateAsync(ClientConfigurationValidationContext context, CT ct); + Task ValidateAsync(ClientConfigurationValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IClientSecretValidator.cs b/identity-server/src/IdentityServer/Validation/IClientSecretValidator.cs index fa996c03f..68bc0312f 100644 --- a/identity-server/src/IdentityServer/Validation/IClientSecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IClientSecretValidator.cs @@ -19,5 +19,5 @@ public interface IClientSecretValidator /// The context. /// The cancellation token. /// - Task ValidateAsync(HttpContext context, CT ct); + Task ValidateAsync(HttpContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ICustomAuthorizeRequestValidator.cs b/identity-server/src/IdentityServer/Validation/ICustomAuthorizeRequestValidator.cs index f277b6bfc..0f85d2509 100644 --- a/identity-server/src/IdentityServer/Validation/ICustomAuthorizeRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ICustomAuthorizeRequestValidator.cs @@ -16,5 +16,5 @@ public interface ICustomAuthorizeRequestValidator /// /// The context. /// The cancellation token. - Task ValidateAsync(CustomAuthorizeRequestValidationContext context, CT ct); + Task ValidateAsync(CustomAuthorizeRequestValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ICustomBackchannelAuthenticationValidator.cs b/identity-server/src/IdentityServer/Validation/ICustomBackchannelAuthenticationValidator.cs index 8bc4812a2..99ea761de 100644 --- a/identity-server/src/IdentityServer/Validation/ICustomBackchannelAuthenticationValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ICustomBackchannelAuthenticationValidator.cs @@ -15,5 +15,5 @@ public interface ICustomBackchannelAuthenticationValidator /// /// The cancellation token. /// - Task ValidateAsync(CustomBackchannelAuthenticationRequestValidationContext customValidationContext, CT ct); + Task ValidateAsync(CustomBackchannelAuthenticationRequestValidationContext customValidationContext, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ICustomTokenRequestValidator.cs b/identity-server/src/IdentityServer/Validation/ICustomTokenRequestValidator.cs index e7c394a98..3eff10abb 100644 --- a/identity-server/src/IdentityServer/Validation/ICustomTokenRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ICustomTokenRequestValidator.cs @@ -19,5 +19,5 @@ public interface ICustomTokenRequestValidator /// /// The validation result /// - Task ValidateAsync(CustomTokenRequestValidationContext context, CT ct); + Task ValidateAsync(CustomTokenRequestValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ICustomTokenValidator.cs b/identity-server/src/IdentityServer/Validation/ICustomTokenValidator.cs index b5c72f843..413e1372a 100644 --- a/identity-server/src/IdentityServer/Validation/ICustomTokenValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ICustomTokenValidator.cs @@ -17,7 +17,7 @@ public interface ICustomTokenValidator /// The validation result so far. /// The cancellation token. /// The validation result - Task ValidateAccessTokenAsync(TokenValidationResult result, CT ct); + Task ValidateAccessTokenAsync(TokenValidationResult result, Ct ct); /// /// Custom validation logic for identity tokens. @@ -25,5 +25,5 @@ public interface ICustomTokenValidator /// The validation result so far. /// The cancellation token. /// The validation result - Task ValidateIdentityTokenAsync(TokenValidationResult result, CT ct); + Task ValidateIdentityTokenAsync(TokenValidationResult result, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IDPoPProofValidator.cs b/identity-server/src/IdentityServer/Validation/IDPoPProofValidator.cs index 0370a4748..12749d1fb 100644 --- a/identity-server/src/IdentityServer/Validation/IDPoPProofValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IDPoPProofValidator.cs @@ -16,5 +16,5 @@ public interface IDPoPProofValidator /// /// The validation context. /// The cancellation token. - Task ValidateAsync(DPoPProofValidatonContext context, CT ct); + Task ValidateAsync(DPoPProofValidatonContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IDeviceAuthorizationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IDeviceAuthorizationRequestValidator.cs index da609386d..8c7076618 100644 --- a/identity-server/src/IdentityServer/Validation/IDeviceAuthorizationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IDeviceAuthorizationRequestValidator.cs @@ -18,5 +18,5 @@ public interface IDeviceAuthorizationRequestValidator /// /// The cancellation token. /// - Task ValidateAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, CT ct); + Task ValidateAsync(NameValueCollection parameters, ClientSecretValidationResult clientValidationResult, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IDeviceCodeValidator.cs b/identity-server/src/IdentityServer/Validation/IDeviceCodeValidator.cs index a9c0bd9a8..1b23102c7 100644 --- a/identity-server/src/IdentityServer/Validation/IDeviceCodeValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IDeviceCodeValidator.cs @@ -15,5 +15,5 @@ public interface IDeviceCodeValidator /// The context. /// The cancellation token. /// - Task ValidateAsync(DeviceCodeValidationContext context, CT ct); + Task ValidateAsync(DeviceCodeValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IEndSessionRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IEndSessionRequestValidator.cs index a6164124b..dab994f09 100644 --- a/identity-server/src/IdentityServer/Validation/IEndSessionRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IEndSessionRequestValidator.cs @@ -21,7 +21,7 @@ public interface IEndSessionRequestValidator /// /// The cancellation token. /// - Task ValidateAsync(NameValueCollection parameters, ClaimsPrincipal subject, CT ct); + Task ValidateAsync(NameValueCollection parameters, ClaimsPrincipal subject, Ct ct); /// /// Validates requests from logout page iframe to trigger single signout. @@ -29,5 +29,5 @@ public interface IEndSessionRequestValidator /// /// The cancellation token. /// - Task ValidateCallbackAsync(NameValueCollection parameters, CT ct); + Task ValidateCallbackAsync(NameValueCollection parameters, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IExtensionGrantValidator.cs b/identity-server/src/IdentityServer/Validation/IExtensionGrantValidator.cs index 53fc082ab..e8ca2c189 100644 --- a/identity-server/src/IdentityServer/Validation/IExtensionGrantValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IExtensionGrantValidator.cs @@ -19,7 +19,7 @@ public interface IExtensionGrantValidator /// /// A principal /// - Task ValidateAsync(ExtensionGrantValidationContext context, CT ct); + Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct); /// /// Returns the grant type this validator can deal with diff --git a/identity-server/src/IdentityServer/Validation/IIdentityProviderConfigurationValidator.cs b/identity-server/src/IdentityServer/Validation/IIdentityProviderConfigurationValidator.cs index 8801a592f..a0c4e2f4e 100644 --- a/identity-server/src/IdentityServer/Validation/IIdentityProviderConfigurationValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IIdentityProviderConfigurationValidator.cs @@ -17,5 +17,5 @@ public interface IIdentityProviderConfigurationValidator /// The context. /// The cancellation token. /// - Task ValidateAsync(IdentityProviderConfigurationValidationContext context, CT ct); + Task ValidateAsync(IdentityProviderConfigurationValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IIntrospectionRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IIntrospectionRequestValidator.cs index 4803b0919..a05414dab 100644 --- a/identity-server/src/IdentityServer/Validation/IIntrospectionRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IIntrospectionRequestValidator.cs @@ -12,5 +12,5 @@ public interface IIntrospectionRequestValidator /// /// Validates the request. /// - Task ValidateAsync(IntrospectionRequestValidationContext context, CT ct); + Task ValidateAsync(IntrospectionRequestValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IIssuerPathValidator.cs b/identity-server/src/IdentityServer/Validation/IIssuerPathValidator.cs index b55adedba..e62f21032 100644 --- a/identity-server/src/IdentityServer/Validation/IIssuerPathValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IIssuerPathValidator.cs @@ -11,5 +11,5 @@ public interface IIssuerPathValidator /// A path component of a URI to validate against the issuer for the current request. /// The cancellation token. /// True if the path component is valid in for the issuer in the context of the current request. - Task ValidateAsync(string path, CT ct); + Task ValidateAsync(string path, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IJwtRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IJwtRequestValidator.cs index 1bf081cc6..ebfccdcb7 100644 --- a/identity-server/src/IdentityServer/Validation/IJwtRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IJwtRequestValidator.cs @@ -16,5 +16,5 @@ public interface IJwtRequestValidator /// /// The validation context. /// The cancellation token. - Task ValidateAsync(JwtRequestValidationContext context, CT ct); + Task ValidateAsync(JwtRequestValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IPushedAuthorizationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IPushedAuthorizationRequestValidator.cs index cbc38c1cd..e34d19c8a 100644 --- a/identity-server/src/IdentityServer/Validation/IPushedAuthorizationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IPushedAuthorizationRequestValidator.cs @@ -24,5 +24,5 @@ public interface IPushedAuthorizationRequestValidator /// A task containing a pushed authorization result that either /// wraps the validated request values or indicates the error code and /// description. - Task ValidateAsync(PushedAuthorizationRequestValidationContext context, CT ct); + Task ValidateAsync(PushedAuthorizationRequestValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IRedirectUriValidator.cs b/identity-server/src/IdentityServer/Validation/IRedirectUriValidator.cs index 7e8feddbd..e9bd7124c 100644 --- a/identity-server/src/IdentityServer/Validation/IRedirectUriValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IRedirectUriValidator.cs @@ -29,7 +29,7 @@ public interface IRedirectUriValidator /// /// The validation context. /// The cancellation token. - Task IsRedirectUriValidAsync(RedirectUriValidationContext context, CT ct) + Task IsRedirectUriValidAsync(RedirectUriValidationContext context, Ct ct) #pragma warning disable CS0618 // Type or member is obsolete => IsRedirectUriValidAsync(context.RequestedUri, context.Client); #pragma warning restore CS0618 // Type or member is obsolete @@ -41,7 +41,7 @@ public interface IRedirectUriValidator /// The client. /// The cancellation token. /// true is the URI is valid; false otherwise. - Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, CT ct); + Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, Ct ct); } /// diff --git a/identity-server/src/IdentityServer/Validation/IRequestObjectValidator.cs b/identity-server/src/IdentityServer/Validation/IRequestObjectValidator.cs index 74b317e04..ff6656b8d 100644 --- a/identity-server/src/IdentityServer/Validation/IRequestObjectValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IRequestObjectValidator.cs @@ -6,7 +6,7 @@ namespace Duende.IdentityServer.Validation; internal interface IRequestObjectValidator { - Task LoadRequestObjectAsync(ValidatedAuthorizeRequest request, CT ct); - Task ValidatePushedAuthorizationRequest(ValidatedAuthorizeRequest request, CT ct); - Task ValidateRequestObjectAsync(ValidatedAuthorizeRequest request, CT ct); + Task LoadRequestObjectAsync(ValidatedAuthorizeRequest request, Ct ct); + Task ValidatePushedAuthorizationRequest(ValidatedAuthorizeRequest request, Ct ct); + Task ValidateRequestObjectAsync(ValidatedAuthorizeRequest request, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IResourceOwnerPasswordValidator.cs b/identity-server/src/IdentityServer/Validation/IResourceOwnerPasswordValidator.cs index 5bb220bcc..3816b66e9 100644 --- a/identity-server/src/IdentityServer/Validation/IResourceOwnerPasswordValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IResourceOwnerPasswordValidator.cs @@ -16,5 +16,5 @@ public interface IResourceOwnerPasswordValidator /// /// The context. /// The cancellation token. - Task ValidateAsync(ResourceOwnerPasswordValidationContext context, CT ct); + Task ValidateAsync(ResourceOwnerPasswordValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IResourceValidator.cs b/identity-server/src/IdentityServer/Validation/IResourceValidator.cs index 882f03bb3..4c3ba66f6 100644 --- a/identity-server/src/IdentityServer/Validation/IResourceValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IResourceValidator.cs @@ -18,5 +18,5 @@ public interface IResourceValidator /// /// The resource validation request. /// The cancellation token. - Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, CT ct); + Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ISecretParser.cs b/identity-server/src/IdentityServer/Validation/ISecretParser.cs index 7fe4a4975..f39c3bf12 100644 --- a/identity-server/src/IdentityServer/Validation/ISecretParser.cs +++ b/identity-server/src/IdentityServer/Validation/ISecretParser.cs @@ -22,7 +22,7 @@ public interface ISecretParser /// /// A parsed secret /// - Task ParseAsync(HttpContext context, CT ct); + Task ParseAsync(HttpContext context, Ct ct); /// /// Returns the authentication method name that this parser implements diff --git a/identity-server/src/IdentityServer/Validation/ISecretValidator.cs b/identity-server/src/IdentityServer/Validation/ISecretValidator.cs index a8508258d..ffc32e3ef 100644 --- a/identity-server/src/IdentityServer/Validation/ISecretValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ISecretValidator.cs @@ -20,5 +20,5 @@ public interface ISecretValidator /// The received secret. /// The cancellation token. /// A validation result - Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct); + Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ISecretsListParser.cs b/identity-server/src/IdentityServer/Validation/ISecretsListParser.cs index 1a92cbe81..14f7da130 100644 --- a/identity-server/src/IdentityServer/Validation/ISecretsListParser.cs +++ b/identity-server/src/IdentityServer/Validation/ISecretsListParser.cs @@ -22,7 +22,7 @@ public interface ISecretsListParser /// /// A parsed secret /// - Task ParseAsync(HttpContext context, CT ct); + Task ParseAsync(HttpContext context, Ct ct); /// /// Gets all available authentication methods. diff --git a/identity-server/src/IdentityServer/Validation/ISecretsListValidator.cs b/identity-server/src/IdentityServer/Validation/ISecretsListValidator.cs index 5b54818e9..7ca568529 100644 --- a/identity-server/src/IdentityServer/Validation/ISecretsListValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ISecretsListValidator.cs @@ -20,5 +20,5 @@ public interface ISecretsListValidator /// The received secret. /// The cancellation token. /// A validation result - Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct); + Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ITokenRequestValidator.cs b/identity-server/src/IdentityServer/Validation/ITokenRequestValidator.cs index a45398662..d28e86118 100644 --- a/identity-server/src/IdentityServer/Validation/ITokenRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ITokenRequestValidator.cs @@ -12,5 +12,5 @@ public interface ITokenRequestValidator /// /// Validates the request. /// - Task ValidateRequestAsync(TokenRequestValidationContext context, CT ct); + Task ValidateRequestAsync(TokenRequestValidationContext context, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ITokenRevocationRequestValidator.cs b/identity-server/src/IdentityServer/Validation/ITokenRevocationRequestValidator.cs index 9f995d220..3f9b7b8ec 100644 --- a/identity-server/src/IdentityServer/Validation/ITokenRevocationRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ITokenRevocationRequestValidator.cs @@ -19,5 +19,5 @@ public interface ITokenRevocationRequestValidator /// The client. /// The cancellation token. /// - Task ValidateRequestAsync(NameValueCollection parameters, Client client, CT ct); + Task ValidateRequestAsync(NameValueCollection parameters, Client client, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/ITokenValidator.cs b/identity-server/src/IdentityServer/Validation/ITokenValidator.cs index eb689b102..ad08f0a8e 100644 --- a/identity-server/src/IdentityServer/Validation/ITokenValidator.cs +++ b/identity-server/src/IdentityServer/Validation/ITokenValidator.cs @@ -16,7 +16,7 @@ public interface ITokenValidator /// The expected scope. /// The cancellation token. /// - Task ValidateAccessTokenAsync(string token, string expectedScope, CT ct); + Task ValidateAccessTokenAsync(string token, string expectedScope, Ct ct); /// /// Validates an identity token. @@ -26,5 +26,5 @@ public interface ITokenValidator /// if set to true the lifetime gets validated. Otherwise not. /// The cancellation token. /// - Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, CT ct); + Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, Ct ct); } diff --git a/identity-server/src/IdentityServer/Validation/IUserInfoRequestValidator.cs b/identity-server/src/IdentityServer/Validation/IUserInfoRequestValidator.cs index 33faf00fe..4fbc15b9b 100644 --- a/identity-server/src/IdentityServer/Validation/IUserInfoRequestValidator.cs +++ b/identity-server/src/IdentityServer/Validation/IUserInfoRequestValidator.cs @@ -15,5 +15,5 @@ public interface IUserInfoRequestValidator /// The access token. /// The cancellation token. /// - Task ValidateRequestAsync(string accessToken, CT ct); + Task ValidateRequestAsync(string accessToken, Ct ct); } diff --git a/identity-server/src/Storage/Services/ICorsPolicyService.cs b/identity-server/src/Storage/Services/ICorsPolicyService.cs index 6e311bfa1..f9a72b7f0 100644 --- a/identity-server/src/Storage/Services/ICorsPolicyService.cs +++ b/identity-server/src/Storage/Services/ICorsPolicyService.cs @@ -17,5 +17,5 @@ public interface ICorsPolicyService /// The origin. /// The cancellation token. /// - Task IsOriginAllowedAsync(string origin, CT ct); + Task IsOriginAllowedAsync(string origin, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IAuthorizationCodeStore.cs b/identity-server/src/Storage/Stores/IAuthorizationCodeStore.cs index 53bce085e..d87de7787 100644 --- a/identity-server/src/Storage/Stores/IAuthorizationCodeStore.cs +++ b/identity-server/src/Storage/Stores/IAuthorizationCodeStore.cs @@ -19,7 +19,7 @@ public interface IAuthorizationCodeStore /// The code. /// The cancellation token. /// - Task StoreAuthorizationCodeAsync(AuthorizationCode code, CT ct); + Task StoreAuthorizationCodeAsync(AuthorizationCode code, Ct ct); /// /// Gets the authorization code. @@ -27,7 +27,7 @@ public interface IAuthorizationCodeStore /// The code. /// The cancellation token. /// - Task GetAuthorizationCodeAsync(string code, CT ct); + Task GetAuthorizationCodeAsync(string code, Ct ct); /// /// Removes the authorization code. @@ -35,5 +35,5 @@ public interface IAuthorizationCodeStore /// The code. /// The cancellation token. /// - Task RemoveAuthorizationCodeAsync(string code, CT ct); + Task RemoveAuthorizationCodeAsync(string code, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IBackChannelAuthenticationRequestStore.cs b/identity-server/src/Storage/Stores/IBackChannelAuthenticationRequestStore.cs index 8c633c0d2..1805939cc 100644 --- a/identity-server/src/Storage/Stores/IBackChannelAuthenticationRequestStore.cs +++ b/identity-server/src/Storage/Stores/IBackChannelAuthenticationRequestStore.cs @@ -18,7 +18,7 @@ public interface IBackChannelAuthenticationRequestStore /// /// The request. /// The cancellation token. - Task CreateRequestAsync(BackChannelAuthenticationRequest request, CT ct); + Task CreateRequestAsync(BackChannelAuthenticationRequest request, Ct ct); /// /// Gets the requests. @@ -26,28 +26,28 @@ public interface IBackChannelAuthenticationRequestStore /// The subject identifier. /// The cancellation token. /// The client identifier. - Task> GetLoginsForUserAsync(string subjectId, CT ct, string? clientId = null); + Task> GetLoginsForUserAsync(string subjectId, Ct ct, string? clientId = null); /// /// Gets the request. /// /// The request identifier. /// The cancellation token. - Task GetByAuthenticationRequestIdAsync(string requestId, CT ct); + Task GetByAuthenticationRequestIdAsync(string requestId, Ct ct); /// /// Gets the request. /// /// The internal identifier. /// The cancellation token. - Task GetByInternalIdAsync(string id, CT ct); + Task GetByInternalIdAsync(string id, Ct ct); /// /// Removes the request. /// /// The internal identifier. /// The cancellation token. - Task RemoveByInternalIdAsync(string id, CT ct); + Task RemoveByInternalIdAsync(string id, Ct ct); /// /// Updates the request. @@ -55,5 +55,5 @@ public interface IBackChannelAuthenticationRequestStore /// The internal identifier. /// The request. /// The cancellation token. - Task UpdateByInternalIdAsync(string id, BackChannelAuthenticationRequest request, CT ct); + Task UpdateByInternalIdAsync(string id, BackChannelAuthenticationRequest request, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IClientStore.cs b/identity-server/src/Storage/Stores/IClientStore.cs index f27cf79cb..e01386fb7 100644 --- a/identity-server/src/Storage/Stores/IClientStore.cs +++ b/identity-server/src/Storage/Stores/IClientStore.cs @@ -18,12 +18,12 @@ public interface IClientStore /// The client id /// The cancellation token. /// The client - Task FindClientByIdAsync(string clientId, CT ct); + Task FindClientByIdAsync(string clientId, Ct ct); /// /// Returns all clients for enumeration purposes (e.g., conformance assessment). /// /// The cancellation token. /// An async enumerable of all clients. - IAsyncEnumerable GetAllClientsAsync(CT ct); + IAsyncEnumerable GetAllClientsAsync(Ct ct); } diff --git a/identity-server/src/Storage/Stores/IDeviceFlowStore.cs b/identity-server/src/Storage/Stores/IDeviceFlowStore.cs index a20419f0d..2ff1ebac5 100644 --- a/identity-server/src/Storage/Stores/IDeviceFlowStore.cs +++ b/identity-server/src/Storage/Stores/IDeviceFlowStore.cs @@ -21,7 +21,7 @@ public interface IDeviceFlowStore /// The data. /// The cancellation token. /// - Task StoreDeviceAuthorizationAsync(string deviceCode, string userCode, DeviceCode data, CT ct); + Task StoreDeviceAuthorizationAsync(string deviceCode, string userCode, DeviceCode data, Ct ct); /// /// Finds device authorization by user code. @@ -29,14 +29,14 @@ public interface IDeviceFlowStore /// The user code. /// The cancellation token. /// - Task FindByUserCodeAsync(string userCode, CT ct); + Task FindByUserCodeAsync(string userCode, Ct ct); /// /// Finds device authorization by device code. /// /// The device code. /// The cancellation token. - Task FindByDeviceCodeAsync(string deviceCode, CT ct); + Task FindByDeviceCodeAsync(string deviceCode, Ct ct); /// /// Updates device authorization, searching by user code. @@ -44,12 +44,12 @@ public interface IDeviceFlowStore /// The user code. /// The data. /// The cancellation token. - Task UpdateByUserCodeAsync(string userCode, DeviceCode data, CT ct); + Task UpdateByUserCodeAsync(string userCode, DeviceCode data, Ct ct); /// /// Removes the device authorization, searching by device code. /// /// The device code. /// The cancellation token. - Task RemoveByDeviceCodeAsync(string deviceCode, CT ct); + Task RemoveByDeviceCodeAsync(string deviceCode, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IIdentityProviderStore.cs b/identity-server/src/Storage/Stores/IIdentityProviderStore.cs index f57c58f05..5fedbf8bd 100644 --- a/identity-server/src/Storage/Stores/IIdentityProviderStore.cs +++ b/identity-server/src/Storage/Stores/IIdentityProviderStore.cs @@ -17,7 +17,7 @@ public interface IIdentityProviderStore /// Gets all identity providers name. /// /// The cancellation token. - Task> GetAllSchemeNamesAsync(CT ct); + Task> GetAllSchemeNamesAsync(Ct ct); /// /// Gets the identity provider by scheme name. @@ -25,5 +25,5 @@ public interface IIdentityProviderStore /// The scheme name. /// The cancellation token. /// - Task GetBySchemeAsync(string scheme, CT ct); + Task GetBySchemeAsync(string scheme, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IPersistedGrantStore.cs b/identity-server/src/Storage/Stores/IPersistedGrantStore.cs index 63a2525a8..b65f356a3 100644 --- a/identity-server/src/Storage/Stores/IPersistedGrantStore.cs +++ b/identity-server/src/Storage/Stores/IPersistedGrantStore.cs @@ -19,7 +19,7 @@ public interface IPersistedGrantStore /// The grant. /// The cancellation token. /// - Task StoreAsync(PersistedGrant grant, CT ct); + Task StoreAsync(PersistedGrant grant, Ct ct); /// /// Gets the grant. @@ -27,7 +27,7 @@ public interface IPersistedGrantStore /// The key. /// The cancellation token. /// - Task GetAsync(string key, CT ct); + Task GetAsync(string key, Ct ct); /// /// Gets all grants based on the filter. @@ -35,7 +35,7 @@ public interface IPersistedGrantStore /// The filter. /// The cancellation token. /// - Task> GetAllAsync(PersistedGrantFilter filter, CT ct); + Task> GetAllAsync(PersistedGrantFilter filter, Ct ct); /// /// Removes the grant by key. @@ -43,7 +43,7 @@ public interface IPersistedGrantStore /// The key. /// The cancellation token. /// - Task RemoveAsync(string key, CT ct); + Task RemoveAsync(string key, Ct ct); /// /// Removes all grants based on the filter. @@ -51,5 +51,5 @@ public interface IPersistedGrantStore /// The filter. /// The cancellation token. /// - Task RemoveAllAsync(PersistedGrantFilter filter, CT ct); + Task RemoveAllAsync(PersistedGrantFilter filter, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IPushedAuthorizationRequestStore.cs b/identity-server/src/Storage/Stores/IPushedAuthorizationRequestStore.cs index dc6b8fc3a..620546e18 100644 --- a/identity-server/src/Storage/Stores/IPushedAuthorizationRequestStore.cs +++ b/identity-server/src/Storage/Stores/IPushedAuthorizationRequestStore.cs @@ -20,7 +20,7 @@ public interface IPushedAuthorizationRequestStore /// The request. /// The cancellation token. /// - Task StoreAsync(PushedAuthorizationRequest pushedAuthorizationRequest, CT ct); + Task StoreAsync(PushedAuthorizationRequest pushedAuthorizationRequest, Ct ct); /// /// Consumes the pushed authorization request, indicating that it should not @@ -34,7 +34,7 @@ public interface IPushedAuthorizationRequestStore /// within the request_uri parameter. /// The cancellation token. /// - Task ConsumeByHashAsync(string referenceValueHash, CT ct); + Task ConsumeByHashAsync(string referenceValueHash, Ct ct); /// /// Gets the pushed authorization request. @@ -46,5 +46,5 @@ public interface IPushedAuthorizationRequestStore /// The pushed authorization request, or null if the request does /// not exist or was previously consumed. /// - Task GetByHashAsync(string referenceValueHash, CT ct); + Task GetByHashAsync(string referenceValueHash, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IReferenceTokenStore.cs b/identity-server/src/Storage/Stores/IReferenceTokenStore.cs index 315084681..6fcae3672 100644 --- a/identity-server/src/Storage/Stores/IReferenceTokenStore.cs +++ b/identity-server/src/Storage/Stores/IReferenceTokenStore.cs @@ -19,7 +19,7 @@ public interface IReferenceTokenStore /// The token. /// The cancellation token. /// - Task StoreReferenceTokenAsync(Token token, CT ct); + Task StoreReferenceTokenAsync(Token token, Ct ct); /// /// Gets the reference token. @@ -27,7 +27,7 @@ public interface IReferenceTokenStore /// The handle. /// The cancellation token. /// - Task GetReferenceTokenAsync(string handle, CT ct); + Task GetReferenceTokenAsync(string handle, Ct ct); /// /// Removes the reference token. @@ -35,7 +35,7 @@ public interface IReferenceTokenStore /// The handle. /// The cancellation token. /// - Task RemoveReferenceTokenAsync(string handle, CT ct); + Task RemoveReferenceTokenAsync(string handle, Ct ct); /// /// Removes the reference tokens. @@ -45,5 +45,5 @@ public interface IReferenceTokenStore /// The session identifier. /// The cancellation token. /// - Task RemoveReferenceTokensAsync(string subjectId, string clientId, string? sessionId, CT ct); + Task RemoveReferenceTokensAsync(string subjectId, string clientId, string? sessionId, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IRefreshTokenStore.cs b/identity-server/src/Storage/Stores/IRefreshTokenStore.cs index f476076e9..46d967733 100644 --- a/identity-server/src/Storage/Stores/IRefreshTokenStore.cs +++ b/identity-server/src/Storage/Stores/IRefreshTokenStore.cs @@ -19,7 +19,7 @@ public interface IRefreshTokenStore /// The refresh token. /// The cancellation token. /// - Task StoreRefreshTokenAsync(RefreshToken refreshToken, CT ct); + Task StoreRefreshTokenAsync(RefreshToken refreshToken, Ct ct); /// /// Updates the refresh token. @@ -28,7 +28,7 @@ public interface IRefreshTokenStore /// The refresh token. /// The cancellation token. /// - Task UpdateRefreshTokenAsync(string handle, RefreshToken refreshToken, CT ct); + Task UpdateRefreshTokenAsync(string handle, RefreshToken refreshToken, Ct ct); /// /// Gets the refresh token. @@ -36,7 +36,7 @@ public interface IRefreshTokenStore /// The refresh token handle. /// The cancellation token. /// - Task GetRefreshTokenAsync(string refreshTokenHandle, CT ct); + Task GetRefreshTokenAsync(string refreshTokenHandle, Ct ct); /// /// Removes the refresh token. @@ -44,7 +44,7 @@ public interface IRefreshTokenStore /// The refresh token handle. /// The cancellation token. /// - Task RemoveRefreshTokenAsync(string refreshTokenHandle, CT ct); + Task RemoveRefreshTokenAsync(string refreshTokenHandle, Ct ct); /// /// Removes the refresh tokens. @@ -53,5 +53,5 @@ public interface IRefreshTokenStore /// The client identifier. /// The cancellation token. /// - Task RemoveRefreshTokensAsync(string subjectId, string clientId, CT ct); + Task RemoveRefreshTokensAsync(string subjectId, string clientId, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IResourceStore.cs b/identity-server/src/Storage/Stores/IResourceStore.cs index e0f3e69d0..7e0bee35a 100644 --- a/identity-server/src/Storage/Stores/IResourceStore.cs +++ b/identity-server/src/Storage/Stores/IResourceStore.cs @@ -18,32 +18,32 @@ public interface IResourceStore /// /// The scope names. /// The cancellation token. - Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct); + Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct); /// /// Gets API scopes by scope name. /// /// The scope names. /// The cancellation token. - Task> FindApiScopesByNameAsync(IEnumerable scopeNames, CT ct); + Task> FindApiScopesByNameAsync(IEnumerable scopeNames, Ct ct); /// /// Gets API resources by scope name. /// /// The scope names. /// The cancellation token. - Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct); + Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct); /// /// Gets API resources by API resource name. /// /// The API resource names. /// The cancellation token. - Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, CT ct); + Task> FindApiResourcesByNameAsync(IEnumerable apiResourceNames, Ct ct); /// /// Gets all resources. /// /// The cancellation token. - Task GetAllResourcesAsync(CT ct); + Task GetAllResourcesAsync(Ct ct); } diff --git a/identity-server/src/Storage/Stores/IServerSideSessionStore.cs b/identity-server/src/Storage/Stores/IServerSideSessionStore.cs index 588f505d9..3327d7b1d 100644 --- a/identity-server/src/Storage/Stores/IServerSideSessionStore.cs +++ b/identity-server/src/Storage/Stores/IServerSideSessionStore.cs @@ -18,28 +18,28 @@ public interface IServerSideSessionStore /// /// The session key. /// The cancellation token. - Task GetSessionAsync(string key, CT ct); + Task GetSessionAsync(string key, Ct ct); /// /// Creates a session /// /// The session to create. /// The cancellation token. - Task CreateSessionAsync(ServerSideSession session, CT ct); + Task CreateSessionAsync(ServerSideSession session, Ct ct); /// /// Updates a session /// /// The session to update. /// The cancellation token. - Task UpdateSessionAsync(ServerSideSession session, CT ct); + Task UpdateSessionAsync(ServerSideSession session, Ct ct); /// /// Deletes a session /// /// The session key. /// The cancellation token. - Task DeleteSessionAsync(string key, CT ct); + Task DeleteSessionAsync(string key, Ct ct); /// @@ -47,14 +47,14 @@ public interface IServerSideSessionStore /// /// The session filter. /// The cancellation token. - Task> GetSessionsAsync(SessionFilter filter, CT ct); + Task> GetSessionsAsync(SessionFilter filter, Ct ct); /// /// Deletes sessions for a specific subject id and/or session id /// /// The session filter. /// The cancellation token. - Task DeleteSessionsAsync(SessionFilter filter, CT ct); + Task DeleteSessionsAsync(SessionFilter filter, Ct ct); /// @@ -62,7 +62,7 @@ public interface IServerSideSessionStore /// /// The maximum number of sessions to return. /// The cancellation token. - Task> GetAndRemoveExpiredSessionsAsync(int count, CT ct); + Task> GetAndRemoveExpiredSessionsAsync(int count, Ct ct); /// @@ -70,5 +70,5 @@ public interface IServerSideSessionStore /// /// The cancellation token. /// The session query filter. - Task> QuerySessionsAsync(CT ct, SessionQuery? filter = null); + Task> QuerySessionsAsync(Ct ct, SessionQuery? filter = null); } diff --git a/identity-server/src/Storage/Stores/ISigningKeyStore.cs b/identity-server/src/Storage/Stores/ISigningKeyStore.cs index 53235f271..f20a669f8 100644 --- a/identity-server/src/Storage/Stores/ISigningKeyStore.cs +++ b/identity-server/src/Storage/Stores/ISigningKeyStore.cs @@ -18,7 +18,7 @@ public interface ISigningKeyStore /// /// The cancellation token. /// - Task> LoadKeysAsync(CT ct); + Task> LoadKeysAsync(Ct ct); /// /// Persists new key in storage. @@ -26,7 +26,7 @@ public interface ISigningKeyStore /// /// The cancellation token. /// - Task StoreKeyAsync(SerializedKey key, CT ct); + Task StoreKeyAsync(SerializedKey key, Ct ct); /// /// Deletes key from storage. @@ -34,5 +34,5 @@ public interface ISigningKeyStore /// /// The cancellation token. /// - Task DeleteKeyAsync(string id, CT ct); + Task DeleteKeyAsync(string id, Ct ct); } diff --git a/identity-server/src/Storage/Stores/IUserConsentStore.cs b/identity-server/src/Storage/Stores/IUserConsentStore.cs index 1f1d318ac..974a58fc3 100644 --- a/identity-server/src/Storage/Stores/IUserConsentStore.cs +++ b/identity-server/src/Storage/Stores/IUserConsentStore.cs @@ -19,7 +19,7 @@ public interface IUserConsentStore /// The consent. /// The cancellation token. /// - Task StoreUserConsentAsync(Consent consent, CT ct); + Task StoreUserConsentAsync(Consent consent, Ct ct); /// /// Gets the user consent. @@ -28,7 +28,7 @@ public interface IUserConsentStore /// The client identifier. /// The cancellation token. /// - Task GetUserConsentAsync(string subjectId, string clientId, CT ct); + Task GetUserConsentAsync(string subjectId, string clientId, Ct ct); /// /// Removes the user consent. @@ -37,5 +37,5 @@ public interface IUserConsentStore /// The client identifier. /// The cancellation token. /// - Task RemoveUserConsentAsync(string subjectId, string clientId, CT ct); + Task RemoveUserConsentAsync(string subjectId, string clientId, Ct ct); } diff --git a/identity-server/templates/src/IdentityServer/Pages/Admin/Clients/ClientRepository.cs b/identity-server/templates/src/IdentityServer/Pages/Admin/Clients/ClientRepository.cs index 9281ee5e0..7f660241a 100644 --- a/identity-server/templates/src/IdentityServer/Pages/Admin/Clients/ClientRepository.cs +++ b/identity-server/templates/src/IdentityServer/Pages/Admin/Clients/ClientRepository.cs @@ -274,7 +274,7 @@ public class ClientRepository(ConfigurationDbContext context) client.AllowedScopes.AddRange(toAdd.Select(s => new ClientScope { Scope = s })); } - // REDIRECTS & LOGOUT URIs (unchanged)... + // REDIRECtS & LOGOUT URIs (unchanged)... var flow = client.AllowedGrantTypes.Select(x => x.GrantType).Single() == GrantType.ClientCredentials ? Flow.ClientCredentials : Flow.CodeFlowWithPkce; diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ConfirmationSecretValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ConfirmationSecretValidator.cs index e797ad79b..b0267dc64 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ConfirmationSecretValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ConfirmationSecretValidator.cs @@ -10,7 +10,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class ConfirmationSecretValidator : ISecretValidator { - public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, CT ct) + public Task ValidateAsync(IEnumerable secrets, ParsedSecret parsedSecret, Ct ct) { if (secrets.Any()) { diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomProfileService.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomProfileService.cs index 88c0dfe18..04f3cb014 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomProfileService.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomProfileService.cs @@ -13,7 +13,7 @@ internal class CustomProfileService : TestUserProfileService public CustomProfileService(TestUserStore users, ILogger logger) : base(users, logger) { } - public override async Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) + public override async Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) { await base.GetProfileDataAsync(context, ct); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseExtensionGrantValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseExtensionGrantValidator.cs index d210f712d..1eee4ccd0 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseExtensionGrantValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseExtensionGrantValidator.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class CustomResponseExtensionGrantValidator : IExtensionGrantValidator { - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { var response = new Dictionary { diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseResourceOwnerValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseResourceOwnerValidator.cs index 5b96b16ce..7a019f827 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseResourceOwnerValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/CustomResponseResourceOwnerValidator.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class CustomResponseResourceOwnerValidator : IResourceOwnerPasswordValidator { - public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, CT ct) + public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, Ct ct) { var response = new Dictionary { diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/DynamicParameterExtensionGrantValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/DynamicParameterExtensionGrantValidator.cs index 5adf7f390..c6da9085e 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/DynamicParameterExtensionGrantValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/DynamicParameterExtensionGrantValidator.cs @@ -10,7 +10,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class DynamicParameterExtensionGrantValidator : IExtensionGrantValidator { - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { var impersonatedClient = context.Request.Raw.Get("impersonated_client"); var lifetime = context.Request.Raw.Get("lifetime"); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator.cs index ffb625c42..db6187a90 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator.cs @@ -10,7 +10,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class ExtensionGrantValidator : IExtensionGrantValidator { - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { var credential = context.Request.Raw.Get("custom_credential"); var extraClaim = context.Request.Raw.Get("extra_claim"); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator2.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator2.cs index 1d0f8b0bc..6ebe41003 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator2.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/ExtensionGrantValidator2.cs @@ -8,7 +8,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class ExtensionGrantValidator2 : IExtensionGrantValidator { - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { var credential = context.Request.Raw.Get("custom_credential"); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/NoSubjectExtensionGrantValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/NoSubjectExtensionGrantValidator.cs index 3cc8175d3..e1c2ccda7 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/NoSubjectExtensionGrantValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/NoSubjectExtensionGrantValidator.cs @@ -9,7 +9,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class NoSubjectExtensionGrantValidator : IExtensionGrantValidator { - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { var credential = context.Request.Raw.Get("custom_credential"); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/TestCustomTokenRequestValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/TestCustomTokenRequestValidator.cs index 6d03445dd..ffa3b6948 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/TestCustomTokenRequestValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Clients/Setup/TestCustomTokenRequestValidator.cs @@ -8,7 +8,7 @@ namespace Duende.IdentityServer.IntegrationTests.Clients.Setup; public class TestCustomTokenRequestValidator : ICustomTokenRequestValidator { - public Task ValidateAsync(CustomTokenRequestValidationContext context, CT ct) + public Task ValidateAsync(CustomTokenRequestValidationContext context, Ct ct) { context.Result.CustomResponse = new Dictionary { diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/BrowserHandler.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/BrowserHandler.cs index eb0611fa3..d13385c03 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/BrowserHandler.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/BrowserHandler.cs @@ -22,7 +22,7 @@ public class BrowserHandler : DelegatingHandler { } - protected async override Task SendAsync(HttpRequestMessage request, CT ct) + protected async override Task SendAsync(HttpRequestMessage request, Ct ct) { var response = await SendCookiesAsync(request, ct); @@ -64,7 +64,7 @@ public class BrowserHandler : DelegatingHandler } } - protected async Task SendCookiesAsync(HttpRequestMessage request, CT ct) + protected async Task SendCookiesAsync(HttpRequestMessage request, Ct ct) { if (AllowCookies) { diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/IdentityServerPipeline.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/IdentityServerPipeline.cs index 7519eaad9..98f0135bf 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/IdentityServerPipeline.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/IdentityServerPipeline.cs @@ -602,7 +602,7 @@ public class MockMessageHandler : DelegatingHandler public Func OnInvoke { get; set; } public HttpResponseMessage Response { get; set; } = new HttpResponseMessage(HttpStatusCode.OK); - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { InvokeWasCalled = true; diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/MessageHandlerWrapper.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/MessageHandlerWrapper.cs index bb2df1fd8..96484e5cf 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/MessageHandlerWrapper.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/MessageHandlerWrapper.cs @@ -13,7 +13,7 @@ public class MessageHandlerWrapper : DelegatingHandler { } - protected async override Task SendAsync(HttpRequestMessage request, CT ct) + protected async override Task SendAsync(HttpRequestMessage request, Ct ct) { Response = await base.SendAsync(request, ct); return Response; diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserNotificationService.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserNotificationService.cs index 63452c58f..b9bff9b8f 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserNotificationService.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserNotificationService.cs @@ -11,7 +11,7 @@ internal class MockCibaUserNotificationService : IBackchannelAuthenticationUserN { public BackchannelUserLoginRequest LoginRequest { get; set; } - public Task SendLoginRequestAsync(BackchannelUserLoginRequest request, CT ct) + public Task SendLoginRequestAsync(BackchannelUserLoginRequest request, Ct ct) { LoginRequest = request; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserValidator.cs index 4767ba309..a5197a861 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/MockCibaUserValidator.cs @@ -11,7 +11,7 @@ internal class MockCibaUserValidator : IBackchannelAuthenticationUserValidator public BackchannelAuthenticationUserValidationResult Result { get; set; } = new BackchannelAuthenticationUserValidationResult(); public BackchannelAuthenticationUserValidatorContext UserValidatorContext { get; set; } - public Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, CT ct) + public Task ValidateRequestAsync(BackchannelAuthenticationUserValidatorContext userValidatorContext, Ct ct) { UserValidatorContext = userValidatorContext; return Task.FromResult(Result); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/MockCustomBackchannelAuthenticationValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/MockCustomBackchannelAuthenticationValidator.cs index 8507efeab..76942e182 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/MockCustomBackchannelAuthenticationValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/MockCustomBackchannelAuthenticationValidator.cs @@ -16,7 +16,7 @@ internal class MockCustomBackchannelAuthenticationValidator : ICustomBackchannel /// public Action Thunk { get; set; } = delegate { }; - public Task ValidateAsync(CustomBackchannelAuthenticationRequestValidationContext customValidationContext, CT ct) + public Task ValidateAsync(CustomBackchannelAuthenticationRequestValidationContext customValidationContext, Ct ct) { Thunk(customValidationContext); Context = customValidationContext; diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/MockResourceValidator.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/MockResourceValidator.cs index 58b11fb87..49d97040a 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/MockResourceValidator.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/MockResourceValidator.cs @@ -12,5 +12,5 @@ internal class MockResourceValidator : IResourceValidator public Task> ParseRequestedScopesAsync(IEnumerable scopeValues) => Task.FromResult(scopeValues.Select(x => new ParsedScopeValue(x))); - public Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, CT ct) => Task.FromResult(Result); + public Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, Ct ct) => Task.FromResult(Result); } diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsMessageHandler.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsMessageHandler.cs index 3cf03e47e..77c2abbe3 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsMessageHandler.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsMessageHandler.cs @@ -16,7 +16,7 @@ public class MtlsMessageHandler : DelegatingHandler public MtlsMessageHandler(HttpMessageHandler innerHandler, X509Certificate2 clientCertificate) : base(innerHandler) => _clientCertificate = clientCertificate; - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { // Add the client certificate as a base64 encoded header for the test middleware to pick up if (_clientCertificate != null) diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsTestMiddleware.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsTestMiddleware.cs index c42a94fd2..cf9d90a4e 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsTestMiddleware.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/MtlsTestMiddleware.cs @@ -71,6 +71,6 @@ public class TlsConnectionFeature : ITlsConnectionFeature { public X509Certificate2 ClientCertificate { get; set; } - public Task GetClientCertificateAsync(CT ct) + public Task GetClientCertificateAsync(Ct ct) => Task.FromResult(ClientCertificate); } diff --git a/identity-server/test/IdentityServer.IntegrationTests/Common/NetworkHandler.cs b/identity-server/test/IdentityServer.IntegrationTests/Common/NetworkHandler.cs index 54765cb85..52d0586b3 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Common/NetworkHandler.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Common/NetworkHandler.cs @@ -56,7 +56,7 @@ public class NetworkHandler : HttpMessageHandler public NetworkHandler(Func action) => _action = action; - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { Request = request; Body = await SafeReadContentFrom(request); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Configuration/DynamicClientRegistrationTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Configuration/DynamicClientRegistrationTests.cs index 16bf4eba0..d4f18d00c 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Configuration/DynamicClientRegistrationTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Configuration/DynamicClientRegistrationTests.cs @@ -11,7 +11,7 @@ namespace Duende.IdentityServer.IntegrationTests.Configuration; public class DynamicClientRegistrationTests : ConfigurationIntegrationTestBase { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task valid_request_creates_new_client() { diff --git a/identity-server/test/IdentityServer.IntegrationTests/ConformanceReport/ConformanceReportIntegrationTests.cs b/identity-server/test/IdentityServer.IntegrationTests/ConformanceReport/ConformanceReportIntegrationTests.cs index 45ca50fc6..73de7f713 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/ConformanceReport/ConformanceReportIntegrationTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/ConformanceReport/ConformanceReportIntegrationTests.cs @@ -80,7 +80,7 @@ public class ConformanceReportIntegrationTests : IAsyncLifetime var html = await response.Content.ReadAsStringAsync(); html.ShouldNotBeEmpty(); - html.ShouldContain(""); + html.ShouldContain(""); html.ShouldContain("OAuth 2.1"); html.ShouldContain("FAPI 2.0"); } diff --git a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/AuthorizeTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/AuthorizeTests.cs index 1f9c7ea5d..e00c527ad 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/AuthorizeTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/AuthorizeTests.cs @@ -1702,7 +1702,7 @@ public class MockAuthzInteractionService : IAuthorizeInteractionResponseGenerato public InteractionResponse Response { get; set; } = new InteractionResponse(); public ValidatedAuthorizeRequest Request { get; internal set; } - public Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, CT ct) + public Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, Ct ct) { Request = request; return Task.FromResult(Response); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/ConsentTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/ConsentTests.cs index 2714fa3da..c36fc4c11 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/ConsentTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/ConsentTests.cs @@ -22,7 +22,7 @@ public class ConsentTests private const string Category = "Authorize and consent tests"; private IdentityServerPipeline _mockPipeline = new IdentityServerPipeline(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public ConsentTests() { diff --git a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/PushedAuthorizationTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/PushedAuthorizationTests.cs index 89daefc03..1431161e1 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/PushedAuthorizationTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Authorize/PushedAuthorizationTests.cs @@ -116,7 +116,7 @@ public class PushedAuthorizationTests state: expectedState ); - _mockPipeline.MockLogger.LogMessages.ShouldContain(msg => msg.Contains("\"client_secret\": \"***REDACTED***\"")); + _mockPipeline.MockLogger.LogMessages.ShouldContain(msg => msg.Contains("\"client_secret\": \"***REDACtED***\"")); _mockPipeline.MockLogger.LogMessages.ShouldNotContain(msg => msg.Contains(clientSecret)); } diff --git a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Ciba/CibaTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Ciba/CibaTests.cs index a77d1ad0b..385d991f4 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Ciba/CibaTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Ciba/CibaTests.cs @@ -21,7 +21,7 @@ public class CibaTests { private const string Category = "Backchannel Authentication (CIBA) endpoint"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerPipeline _mockPipeline = new(); private MockCibaUserValidator _mockCibaUserValidator = new(); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Token/CibaTokenEndpointTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Token/CibaTokenEndpointTests.cs index 4270118c6..4d488c798 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Token/CibaTokenEndpointTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Endpoints/Token/CibaTokenEndpointTests.cs @@ -19,7 +19,7 @@ namespace Duende.IdentityServer.IntegrationTests.Endpoints.Token; public class CibaTokenEndpointTests { private const string Category = "CIBA Token endpoint"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerPipeline _mockPipeline = new IdentityServerPipeline(); private MockCibaUserValidator _mockCibaUserValidator = new MockCibaUserValidator(); diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/EntityFrameworkBasedLogoutTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/EntityFrameworkBasedLogoutTests.cs index ba08fd210..11017a549 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/EntityFrameworkBasedLogoutTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/EntityFrameworkBasedLogoutTests.cs @@ -21,7 +21,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework; public class EntityFrameworkBasedLogoutTests { private readonly IdentityServerPipeline _mockPipeline = new(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private static readonly ICollection _clients = [ diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/NetworkDelaySimulationInterceptor.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/NetworkDelaySimulationInterceptor.cs index 91418b041..c304479c8 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/NetworkDelaySimulationInterceptor.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/NetworkDelaySimulationInterceptor.cs @@ -12,7 +12,7 @@ public class NetworkDelaySimulationInterceptor(TimeSpan delay) : DbCommandInterc DbCommand command, CommandEventData eventData, InterceptionResult result, - CT ct = default) + Ct ct = default) { await Task.Delay(delay, ct); return result; diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Services/CorsPolicyServiceTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Services/CorsPolicyServiceTests.cs index ff63c7d44..89de36239 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Services/CorsPolicyServiceTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Services/CorsPolicyServiceTests.cs @@ -14,7 +14,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework.Services; public class CorsPolicyServiceTests : IntegrationTest { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public CorsPolicyServiceTests(DatabaseProviderFixture fixture) : base(fixture) { diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/MockOperationalStoreNotification.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/MockOperationalStoreNotification.cs index 68a114666..101511019 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/MockOperationalStoreNotification.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/MockOperationalStoreNotification.cs @@ -15,14 +15,14 @@ public class MockOperationalStoreNotification : IOperationalStoreNotification public Action> OnPersistedGrantsRemoved = _ => { }; public Action> OnDeviceFlowCodesRemoved = _ => { }; - public Task PersistedGrantsRemovedAsync(IEnumerable persistedGrants, CT ct) + public Task PersistedGrantsRemovedAsync(IEnumerable persistedGrants, Ct ct) { OnPersistedGrantsRemoved(persistedGrants); PersistedGrantNotifications.Add(persistedGrants); return Task.CompletedTask; } - public Task DeviceCodesRemovedAsync(IEnumerable deviceCodes, CT ct) + public Task DeviceCodesRemovedAsync(IEnumerable deviceCodes, Ct ct) { OnDeviceFlowCodesRemoved(deviceCodes); DeviceFlowCodeNotifications.Append(deviceCodes); diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ClientStoreTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ClientStoreTests.cs index 16cf559cf..a4a1484d2 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ClientStoreTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ClientStoreTests.cs @@ -15,7 +15,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework.Storage.Stores; public class ClientStoreTests : IntegrationTest { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public ClientStoreTests(DatabaseProviderFixture fixture) : base(fixture) { diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/DeviceFlowStoreTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/DeviceFlowStoreTests.cs index 20a0ee0d4..f5b20286f 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/DeviceFlowStoreTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/DeviceFlowStoreTests.cs @@ -18,7 +18,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework.Storage.Stores; public class DeviceFlowStoreTests : IntegrationTest { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private readonly IPersistentGrantSerializer serializer = new PersistentGrantSerializer(); public DeviceFlowStoreTests(DatabaseProviderFixture fixture) : base(fixture) diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/IdentityProviderStoreTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/IdentityProviderStoreTests.cs index 020d8a255..641dec1e5 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/IdentityProviderStoreTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/IdentityProviderStoreTests.cs @@ -14,7 +14,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework.Storage.Stores; public class IdentityProviderStoreTests : IntegrationTest { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public IdentityProviderStoreTests(DatabaseProviderFixture fixture) : base(fixture) { diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/PersistedGrantStoreTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/PersistedGrantStoreTests.cs index 2e63b18b5..fcc619f45 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/PersistedGrantStoreTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/PersistedGrantStoreTests.cs @@ -15,7 +15,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework.Storage.Stores; public class PersistedGrantStoreTests : IntegrationTest { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public PersistedGrantStoreTests(DatabaseProviderFixture fixture) : base(fixture) { diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ResourceStoreTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ResourceStoreTests.cs index 8b60a1a98..1973ef439 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ResourceStoreTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/Stores/ResourceStoreTests.cs @@ -15,7 +15,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework.Storage.Stores; public class ScopeStoreTests : IntegrationTest { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public ScopeStoreTests(DatabaseProviderFixture fixture) : base(fixture) { diff --git a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/TokenCleanup/TokenCleanupTests.cs b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/TokenCleanup/TokenCleanupTests.cs index 319d776a8..083353160 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/TokenCleanup/TokenCleanupTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/EntityFramework/Storage/TokenCleanup/TokenCleanupTests.cs @@ -18,7 +18,7 @@ namespace Duende.IdentityServer.IntegrationTests.EntityFramework.Storage.TokenCl public class TokenCleanupTests : IntegrationTest { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public TokenCleanupTests(DatabaseProviderFixture fixture) : base(fixture) { foreach (var options in TestDatabaseProviders) diff --git a/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomAuthorizeResponseGeneratorTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomAuthorizeResponseGeneratorTests.cs index 78a62b30f..14674a09a 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomAuthorizeResponseGeneratorTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomAuthorizeResponseGeneratorTests.cs @@ -94,7 +94,7 @@ public class CustomAuthorizeResponseGenerator( : AuthorizeResponseGenerator(options, timeProvider, tokenService, keyMaterialService, authorizationCodeStore, logger, events) { - public override async Task CreateResponseAsync(ValidatedAuthorizeRequest request, CT ct) + public override async Task CreateResponseAsync(ValidatedAuthorizeRequest request, Ct ct) { var baseResponse = await base.CreateResponseAsync(request, ct).ConfigureAwait(false); if (!baseResponse.IsError) diff --git a/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomClaimsServiceTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomClaimsServiceTests.cs index bbe5b845f..3ea10bbbf 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomClaimsServiceTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomClaimsServiceTests.cs @@ -77,7 +77,7 @@ public class CustomClaimsService : DefaultClaimsService { } - public override async Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resourceResult, ValidatedRequest request, CT ct) + public override async Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resourceResult, ValidatedRequest request, Ct ct) { var result = (await base.GetAccessTokenClaimsAsync(subject, resourceResult, request, ct)).ToList(); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomProfileServiceTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomProfileServiceTests.cs index 1064e56a6..c64253846 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomProfileServiceTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Extensibility/CustomProfileServiceTests.cs @@ -82,7 +82,7 @@ public class CustomProfileServiceTests public class CustomProfileService : IProfileService { - public Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) + public Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) { var claims = new Claim[] { @@ -92,7 +92,7 @@ public class CustomProfileService : IProfileService return Task.CompletedTask; } - public Task IsActiveAsync(IsActiveContext context, CT ct) + public Task IsActiveAsync(IsActiveContext context, Ct ct) { context.IsActive = true; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.IntegrationTests/Hosting/CorsTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Hosting/CorsTests.cs index b369a1eb4..e1f9a23ac 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Hosting/CorsTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Hosting/CorsTests.cs @@ -134,7 +134,7 @@ public class StubCorePolicyProvider : ICorsPolicyService public bool Result; public bool WasCalled; - public Task IsOriginAllowedAsync(string origin, CT ct) + public Task IsOriginAllowedAsync(string origin, Ct ct) { WasCalled = true; return Task.FromResult(Result); diff --git a/identity-server/test/IdentityServer.IntegrationTests/Hosting/DynamicProvidersTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Hosting/DynamicProvidersTests.cs index f50302d85..6abab0300 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Hosting/DynamicProvidersTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Hosting/DynamicProvidersTests.cs @@ -19,7 +19,7 @@ namespace Duende.IdentityServer.IntegrationTests.Hosting; public class DynamicProvidersTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private GenericHost _host; private GenericHost _idp1; private GenericHost _idp2; diff --git a/identity-server/test/IdentityServer.IntegrationTests/Hosting/ServerSideSessionTests.cs b/identity-server/test/IdentityServer.IntegrationTests/Hosting/ServerSideSessionTests.cs index e7e5470c3..ba3ff92fa 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/Hosting/ServerSideSessionTests.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/Hosting/ServerSideSessionTests.cs @@ -31,7 +31,7 @@ public class ServerSideSessionTests private IPersistedGrantStore _grantStore; private IRefreshTokenStore _refreshTokenStore; private IDataProtector _protector; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private MockServerUrls _urls = new MockServerUrls(); diff --git a/identity-server/test/IdentityServer.IntegrationTests/TestFramework/TestBrowserClient.cs b/identity-server/test/IdentityServer.IntegrationTests/TestFramework/TestBrowserClient.cs index 61bfda2a0..e20a817c8 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/TestFramework/TestBrowserClient.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/TestFramework/TestBrowserClient.cs @@ -23,7 +23,7 @@ public class TestBrowserClient : HttpClient { } - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { CurrentUri = request.RequestUri; var cookieHeader = CookieContainer.GetCookieHeader(request.RequestUri); diff --git a/identity-server/test/IdentityServer.IntegrationTests/TestHosts/IdentityServerHost.cs b/identity-server/test/IdentityServer.IntegrationTests/TestHosts/IdentityServerHost.cs index ee536963f..254c98d97 100644 --- a/identity-server/test/IdentityServer.IntegrationTests/TestHosts/IdentityServerHost.cs +++ b/identity-server/test/IdentityServer.IntegrationTests/TestHosts/IdentityServerHost.cs @@ -60,7 +60,7 @@ public class IdentityServerHost : GenericHost } - public async Task GetClientAsync(string clientId, CT ct) + public async Task GetClientAsync(string clientId, Ct ct) { var store = Resolve(); return await store.FindClientByIdAsync(clientId, ct); diff --git a/identity-server/test/IdentityServer.UnitTests/AspNetIdentity/DefaultSessionClaimsFilterTests.cs b/identity-server/test/IdentityServer.UnitTests/AspNetIdentity/DefaultSessionClaimsFilterTests.cs index e5d3ba919..55b68e73c 100644 --- a/identity-server/test/IdentityServer.UnitTests/AspNetIdentity/DefaultSessionClaimsFilterTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/AspNetIdentity/DefaultSessionClaimsFilterTests.cs @@ -10,7 +10,7 @@ namespace IdentityServer.UnitTests.AspNetIdentity; public class DefaultSessionClaimsFilterTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task FilterToSessionClaimsAsync_with_session_and_non_session_claims_should_filter_to_only_session_claims() diff --git a/identity-server/test/IdentityServer.UnitTests/Caches/MockCache.cs b/identity-server/test/IdentityServer.UnitTests/Caches/MockCache.cs index 42f284720..13bb23749 100644 --- a/identity-server/test/IdentityServer.UnitTests/Caches/MockCache.cs +++ b/identity-server/test/IdentityServer.UnitTests/Caches/MockCache.cs @@ -46,13 +46,13 @@ public class MockCache : ICache CacheItems[key] = ci; } - public Task GetAsync(string key, CT ct) + public Task GetAsync(string key, Ct ct) { TryGetValue(key, out var item); return Task.FromResult(item); } - public async Task GetOrAddAsync(string key, TimeSpan duration, Func> get, CT ct) + public async Task GetOrAddAsync(string key, TimeSpan duration, Func> get, Ct ct) { if (!TryGetValue(key, out var item)) { @@ -63,13 +63,13 @@ public class MockCache : ICache return item; } - public Task RemoveAsync(string key, CT ct) + public Task RemoveAsync(string key, Ct ct) { CacheItems.Remove(key); return Task.CompletedTask; } - public Task SetAsync(string key, T item, TimeSpan expiration, CT ct) + public Task SetAsync(string key, T item, TimeSpan expiration, Ct ct) { Add(key, item, expiration); return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Caches/ResourceStoreCacheTests.cs b/identity-server/test/IdentityServer.UnitTests/Caches/ResourceStoreCacheTests.cs index 7fc077318..8b6e74927 100644 --- a/identity-server/test/IdentityServer.UnitTests/Caches/ResourceStoreCacheTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Caches/ResourceStoreCacheTests.cs @@ -13,7 +13,7 @@ namespace IdentityServer.UnitTests.Caches; public class ResourceStoreCacheTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private List _clients { get; set; } = new List(); private List _identityResources { get; set; } = new List(); diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockBackChannelAuthenticationRequestStore.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockBackChannelAuthenticationRequestStore.cs index 29d555fd4..d4f42eb07 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockBackChannelAuthenticationRequestStore.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockBackChannelAuthenticationRequestStore.cs @@ -12,7 +12,7 @@ public class MockBackChannelAuthenticationRequestStore : IBackChannelAuthenticat { public Dictionary Items { get; set; } = new Dictionary(); - public Task CreateRequestAsync(BackChannelAuthenticationRequest request, CT _) + public Task CreateRequestAsync(BackChannelAuthenticationRequest request, Ct _) { var key = Guid.NewGuid().ToString(); request.InternalId = key.Sha256(); @@ -20,15 +20,15 @@ public class MockBackChannelAuthenticationRequestStore : IBackChannelAuthenticat return Task.FromResult(key); } - public Task GetByAuthenticationRequestIdAsync(string requestId, CT _) => Task.FromResult(Items[requestId]); + public Task GetByAuthenticationRequestIdAsync(string requestId, Ct _) => Task.FromResult(Items[requestId]); - public Task GetByInternalIdAsync(string id, CT _) + public Task GetByInternalIdAsync(string id, Ct _) { var item = Items.SingleOrDefault(x => x.Value.InternalId == id); return Task.FromResult(item.Value); } - public Task> GetLoginsForUserAsync(string subjectId, CT ct, string clientId = null) + public Task> GetLoginsForUserAsync(string subjectId, Ct ct, string clientId = null) { var items = Items.Where(x => x.Value.Subject.GetSubjectId() == subjectId && (clientId == null || x.Value.ClientId == clientId) @@ -36,7 +36,7 @@ public class MockBackChannelAuthenticationRequestStore : IBackChannelAuthenticat return Task.FromResult(items.Select(x => x.Value).AsEnumerable()); } - public Task RemoveByInternalIdAsync(string id, CT _) + public Task RemoveByInternalIdAsync(string id, Ct _) { var item = Items.SingleOrDefault(x => x.Value.InternalId == id); if (item.Key != null) @@ -46,7 +46,7 @@ public class MockBackChannelAuthenticationRequestStore : IBackChannelAuthenticat return Task.CompletedTask; } - public Task UpdateByInternalIdAsync(string id, BackChannelAuthenticationRequest request, CT _) + public Task UpdateByInternalIdAsync(string id, BackChannelAuthenticationRequest request, Ct _) { var item = Items.SingleOrDefault(x => x.Value.InternalId == id); if (item.Key != null) diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockCache.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockCache.cs index d6ece845c..a47b665a7 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockCache.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockCache.cs @@ -12,13 +12,13 @@ public class MockCache : ICache public Dictionary Items { get; set; } = new Dictionary(); - public Task GetAsync(string key, CT ct) + public Task GetAsync(string key, Ct ct) { Items.TryGetValue(key, out var item); return Task.FromResult(item); } - public async Task GetOrAddAsync(string key, TimeSpan duration, Func> get, CT ct) + public async Task GetOrAddAsync(string key, TimeSpan duration, Func> get, Ct ct) { var item = await GetAsync(key, ct); if (item == null) @@ -29,13 +29,13 @@ public class MockCache : ICache return item; } - public Task RemoveAsync(string key, CT ct) + public Task RemoveAsync(string key, Ct ct) { Items.Remove(key); return Task.CompletedTask; } - public Task SetAsync(string key, T item, TimeSpan expiration, CT ct) + public Task SetAsync(string key, T item, TimeSpan expiration, Ct ct) { Items[key] = item; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockClaimsService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockClaimsService.cs index 50672ed0b..41c33edef 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockClaimsService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockClaimsService.cs @@ -13,7 +13,7 @@ internal class MockClaimsService : IClaimsService public List IdentityTokenClaims { get; set; } = new List(); public List AccessTokenClaims { get; set; } = new List(); - public Task> GetIdentityTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, bool includeAllIdentityClaims, ValidatedRequest request, CT ct) => Task.FromResult(IdentityTokenClaims.AsEnumerable()); + public Task> GetIdentityTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, bool includeAllIdentityClaims, ValidatedRequest request, Ct ct) => Task.FromResult(IdentityTokenClaims.AsEnumerable()); - public Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, ValidatedRequest request, CT ct) => Task.FromResult(AccessTokenClaims.AsEnumerable()); + public Task> GetAccessTokenClaimsAsync(ClaimsPrincipal subject, ResourceValidationResult resources, ValidatedRequest request, Ct ct) => Task.FromResult(AccessTokenClaims.AsEnumerable()); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockConsentMessageStore.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockConsentMessageStore.cs index 6735892a6..655651d9c 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockConsentMessageStore.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockConsentMessageStore.cs @@ -11,7 +11,7 @@ public class MockConsentMessageStore : IConsentMessageStore { public Dictionary> Messages { get; set; } = new Dictionary>(); - public Task DeleteAsync(string id, CT ct) + public Task DeleteAsync(string id, Ct ct) { if (id != null && Messages.ContainsKey(id)) { @@ -20,7 +20,7 @@ public class MockConsentMessageStore : IConsentMessageStore return Task.CompletedTask; } - public Task> ReadAsync(string id, CT ct) + public Task> ReadAsync(string id, Ct ct) { Message val = null; if (id != null) @@ -30,7 +30,7 @@ public class MockConsentMessageStore : IConsentMessageStore return Task.FromResult(val); } - public Task WriteAsync(string id, Message message, CT ct) + public Task WriteAsync(string id, Message message, Ct ct) { Messages[id] = message; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockConsentService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockConsentService.cs index d84e819bf..870a836d2 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockConsentService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockConsentService.cs @@ -13,13 +13,13 @@ public class MockConsentService : IConsentService { public bool RequiresConsentResult { get; set; } - public Task RequiresConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, CT ct) => Task.FromResult(RequiresConsentResult); + public Task RequiresConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, Ct ct) => Task.FromResult(RequiresConsentResult); public ClaimsPrincipal ConsentSubject { get; set; } public Client ConsentClient { get; set; } public IEnumerable ConsentScopes { get; set; } - public Task UpdateConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, CT ct) + public Task UpdateConsentAsync(ClaimsPrincipal subject, Client client, IEnumerable parsedScopes, Ct ct) { ConsentSubject = subject; ConsentClient = client; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockEventSink.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockEventSink.cs index 3342d93c3..aea51e78b 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockEventSink.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockEventSink.cs @@ -11,7 +11,7 @@ internal class MockEventSink : IEventSink { public List Events { get; } = []; - public Task PersistAsync(Event evt, CT ct) + public Task PersistAsync(Event evt, Ct ct) { Events.Add(evt); return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockJwtRequestUriHttpClient.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockJwtRequestUriHttpClient.cs index 217670c40..79099b7c4 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockJwtRequestUriHttpClient.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockJwtRequestUriHttpClient.cs @@ -11,5 +11,5 @@ public class MockJwtRequestUriHttpClient : IJwtRequestUriHttpClient { public string Jwt { get; set; } - public Task GetJwtAsync(string url, Client client, CT ct) => Task.FromResult(Jwt); + public Task GetJwtAsync(string url, Client client, Ct ct) => Task.FromResult(Jwt); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockKeyMaterialService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockKeyMaterialService.cs index 80c0af2bc..c435848f5 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockKeyMaterialService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockKeyMaterialService.cs @@ -13,9 +13,9 @@ internal class MockKeyMaterialService : IKeyMaterialService public List SigningCredentials = new List(); public List ValidationKeys = new List(); - public Task> GetAllSigningCredentialsAsync(CT ct) => Task.FromResult(SigningCredentials.AsEnumerable()); + public Task> GetAllSigningCredentialsAsync(Ct ct) => Task.FromResult(SigningCredentials.AsEnumerable()); - public Task GetSigningCredentialsAsync(IEnumerable allowedAlgorithms, CT ct) => Task.FromResult(SigningCredentials.FirstOrDefault()); + public Task GetSigningCredentialsAsync(IEnumerable allowedAlgorithms, Ct ct) => Task.FromResult(SigningCredentials.FirstOrDefault()); - public Task> GetValidationKeysAsync(CT ct) => Task.FromResult(ValidationKeys.AsEnumerable()); + public Task> GetValidationKeysAsync(Ct ct) => Task.FromResult(ValidationKeys.AsEnumerable()); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockLogoutNotificationService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockLogoutNotificationService.cs index 184b1563a..fb3161350 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockLogoutNotificationService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockLogoutNotificationService.cs @@ -15,13 +15,13 @@ public class MockLogoutNotificationService : ILogoutNotificationService public bool SendBackChannelLogoutNotificationsCalled { get; set; } public List BackChannelLogoutRequests { get; set; } = new List(); - public Task> GetFrontChannelLogoutNotificationsUrlsAsync(LogoutNotificationContext context, CT _) + public Task> GetFrontChannelLogoutNotificationsUrlsAsync(LogoutNotificationContext context, Ct _) { GetFrontChannelLogoutNotificationsUrlsCalled = true; return Task.FromResult(FrontChannelLogoutNotificationsUrls.AsEnumerable()); } - public Task> GetBackChannelLogoutNotificationsAsync(LogoutNotificationContext context, CT _) + public Task> GetBackChannelLogoutNotificationsAsync(LogoutNotificationContext context, Ct _) { SendBackChannelLogoutNotificationsCalled = true; return Task.FromResult(BackChannelLogoutRequests.AsEnumerable()); diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockMessageStore.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockMessageStore.cs index 9a3f5c1cd..93b319170 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockMessageStore.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockMessageStore.cs @@ -11,7 +11,7 @@ public class MockMessageStore : IMessageStore { public Dictionary> Messages { get; set; } = new Dictionary>(); - public Task> ReadAsync(string id, CT ct) + public Task> ReadAsync(string id, Ct ct) { Message val = null; if (id != null) @@ -21,7 +21,7 @@ public class MockMessageStore : IMessageStore return Task.FromResult(val); } - public Task WriteAsync(Message message, CT ct) + public Task WriteAsync(Message message, Ct ct) { var id = Guid.NewGuid().ToString(); Messages[id] = message; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockPersistedGrantService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockPersistedGrantService.cs index 9b65c8cba..cedf0b79b 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockPersistedGrantService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockPersistedGrantService.cs @@ -12,9 +12,9 @@ public class MockPersistedGrantService : IPersistedGrantService public IEnumerable GetAllGrantsResult { get; set; } public bool RemoveAllGrantsWasCalled { get; set; } - public Task> GetAllGrantsAsync(string subjectId, CT ct) => Task.FromResult(GetAllGrantsResult ?? Enumerable.Empty()); + public Task> GetAllGrantsAsync(string subjectId, Ct ct) => Task.FromResult(GetAllGrantsResult ?? Enumerable.Empty()); - public Task RemoveAllGrantsAsync(string subjectId, CT ct, string clientId = null, string sessionId = null) + public Task RemoveAllGrantsAsync(string subjectId, Ct ct, string clientId = null, string sessionId = null) { RemoveAllGrantsWasCalled = true; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockProfileService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockProfileService.cs index f3d090a6b..85c1c2c11 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockProfileService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockProfileService.cs @@ -19,14 +19,14 @@ public class MockProfileService : IProfileService public bool IsActiveWasCalled => ActiveContext != null; public IsActiveContext ActiveContext { get; set; } - public Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) + public Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) { ProfileContext = context; context.IssuedClaims = ProfileClaims.ToList(); return Task.CompletedTask; } - public Task IsActiveAsync(IsActiveContext context, CT ct) + public Task IsActiveAsync(IsActiveContext context, Ct ct) { ActiveContext = context; context.IsActive = IsActive; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockReferenceTokenStore.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockReferenceTokenStore.cs index 504226547..ccf0d8d47 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockReferenceTokenStore.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockReferenceTokenStore.cs @@ -9,11 +9,11 @@ namespace UnitTests.Common; internal class MockReferenceTokenStore : IReferenceTokenStore { - public Task GetReferenceTokenAsync(string handle, CT ct) => throw new NotImplementedException(); + public Task GetReferenceTokenAsync(string handle, Ct ct) => throw new NotImplementedException(); - public Task RemoveReferenceTokenAsync(string handle, CT ct) => throw new NotImplementedException(); + public Task RemoveReferenceTokenAsync(string handle, Ct ct) => throw new NotImplementedException(); - public Task RemoveReferenceTokensAsync(string subjectId, string clientId, string sessionId, CT ct) => throw new NotImplementedException(); + public Task RemoveReferenceTokensAsync(string subjectId, string clientId, string sessionId, Ct ct) => throw new NotImplementedException(); - public Task StoreReferenceTokenAsync(Token token, CT ct) => throw new NotImplementedException(); + public Task StoreReferenceTokenAsync(Token token, Ct ct) => throw new NotImplementedException(); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockReplayCache.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockReplayCache.cs index 0682987c3..b7fc8fa77 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockReplayCache.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockReplayCache.cs @@ -10,7 +10,7 @@ public class MockReplayCache : IReplayCache { public bool Exists { get; set; } - public Task AddAsync(string purpose, string handle, DateTimeOffset expiration, CT ct) => Task.CompletedTask; + public Task AddAsync(string purpose, string handle, DateTimeOffset expiration, Ct ct) => Task.CompletedTask; - public Task ExistsAsync(string purpose, string handle, CT ct) => Task.FromResult(Exists); + public Task ExistsAsync(string purpose, string handle, Ct ct) => Task.FromResult(Exists); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockResourceValidator.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockResourceValidator.cs index 20578827e..f80e204ea 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockResourceValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockResourceValidator.cs @@ -12,5 +12,5 @@ internal class MockResourceValidator : IResourceValidator public Task> ParseRequestedScopesAsync(IEnumerable scopeValues) => Task.FromResult(scopeValues.Select(x => new ParsedScopeValue(x))); - public Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, CT ct) => Task.FromResult(Result); + public Task ValidateRequestedResourcesAsync(ResourceValidationRequest request, Ct ct) => Task.FromResult(Result); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockReturnUrlParser.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockReturnUrlParser.cs index 994214573..fca21436a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockReturnUrlParser.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockReturnUrlParser.cs @@ -16,7 +16,7 @@ public class MockReturnUrlParser : ReturnUrlParser { } - public override Task ParseAsync(string returnUrl, CT ct) => Task.FromResult(AuthorizationRequestResult); + public override Task ParseAsync(string returnUrl, Ct ct) => Task.FromResult(AuthorizationRequestResult); public override bool IsValidReturnUrl(string returnUrl) => IsValidReturnUrlResult; } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockTokenCreationService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockTokenCreationService.cs index c6c03e62e..702d9ed95 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockTokenCreationService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockTokenCreationService.cs @@ -12,7 +12,7 @@ internal class MockTokenCreationService : ITokenCreationService public string TokenResult { get; set; } public Token Token { get; set; } - public Task CreateTokenAsync(Token token, CT ct) + public Task CreateTokenAsync(Token token, Ct ct) { Token = token; return Task.FromResult(TokenResult); diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockUiLocaleService.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockUiLocaleService.cs index ea5e2c3a7..4d2bb491b 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockUiLocaleService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockUiLocaleService.cs @@ -8,5 +8,5 @@ namespace UnitTests.Common; public class MockUiLocaleService : IUiLocalesService { - public Task StoreUiLocalesForRedirectAsync(string? uiLocales, CT ct) => Task.CompletedTask; + public Task StoreUiLocalesForRedirectAsync(string? uiLocales, Ct ct) => Task.CompletedTask; } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/MockUserSession.cs b/identity-server/test/IdentityServer.UnitTests/Common/MockUserSession.cs index f5c365234..96e3dd9b9 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/MockUserSession.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/MockUserSession.cs @@ -21,7 +21,7 @@ public class MockUserSession : IUserSession public AuthenticationProperties Properties { get; set; } - public Task CreateSessionIdAsync(ClaimsPrincipal principal, AuthenticationProperties properties, CT ct) + public Task CreateSessionIdAsync(ClaimsPrincipal principal, AuthenticationProperties properties, Ct ct) { CreateSessionIdWasCalled = true; User = principal; @@ -29,25 +29,25 @@ public class MockUserSession : IUserSession return Task.FromResult(SessionId); } - public Task GetUserAsync(CT ct) => Task.FromResult(User); + public Task GetUserAsync(Ct ct) => Task.FromResult(User); - Task IUserSession.GetSessionIdAsync(CT ct) => Task.FromResult(SessionId); + Task IUserSession.GetSessionIdAsync(Ct ct) => Task.FromResult(SessionId); - public Task EnsureSessionIdCookieAsync(CT ct) + public Task EnsureSessionIdCookieAsync(Ct ct) { EnsureSessionIdCookieWasCalled = true; return Task.CompletedTask; } - public Task RemoveSessionIdCookieAsync(CT ct) + public Task RemoveSessionIdCookieAsync(Ct ct) { RemoveSessionIdCookieWasCalled = true; return Task.CompletedTask; } - public Task> GetClientListAsync(CT ct) => Task.FromResult>(Clients); + public Task> GetClientListAsync(Ct ct) => Task.FromResult>(Clients); - public Task AddClientIdAsync(string clientId, CT ct) + public Task AddClientIdAsync(string clientId, Ct ct) { Clients.Add(clientId); return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/NetworkHandler.cs b/identity-server/test/IdentityServer.UnitTests/Common/NetworkHandler.cs index c2997657e..a6516a279 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/NetworkHandler.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/NetworkHandler.cs @@ -56,7 +56,7 @@ public class NetworkHandler : HttpMessageHandler public NetworkHandler(Func action) => _action = action; - protected override async Task SendAsync(HttpRequestMessage request, CT ct) + protected override async Task SendAsync(HttpRequestMessage request, Ct ct) { Request = request; Body = await SafeReadContentFrom(request); diff --git a/identity-server/test/IdentityServer.UnitTests/Common/StubAuthorizeResponseGenerator.cs b/identity-server/test/IdentityServer.UnitTests/Common/StubAuthorizeResponseGenerator.cs index 1a42f3c0e..cf34872d7 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/StubAuthorizeResponseGenerator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/StubAuthorizeResponseGenerator.cs @@ -11,5 +11,5 @@ internal class StubAuthorizeResponseGenerator : IAuthorizeResponseGenerator { public AuthorizeResponse Response { get; set; } = new AuthorizeResponse(); - public Task CreateResponseAsync(ValidatedAuthorizeRequest request, CT ct) => Task.FromResult(Response); + public Task CreateResponseAsync(ValidatedAuthorizeRequest request, Ct ct) => Task.FromResult(Response); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/StubHandleGenerationService.cs b/identity-server/test/IdentityServer.UnitTests/Common/StubHandleGenerationService.cs index cfa043a80..13c52ec88 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/StubHandleGenerationService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/StubHandleGenerationService.cs @@ -10,7 +10,7 @@ public class StubHandleGenerationService : DefaultHandleGenerationService, IHand { public string Handle { get; set; } - public new Task GenerateAsync(CT ct, int length = 32) + public new Task GenerateAsync(Ct ct, int length = 32) { if (Handle != null) { diff --git a/identity-server/test/IdentityServer.UnitTests/Common/StubSessionCoordinationService.cs b/identity-server/test/IdentityServer.UnitTests/Common/StubSessionCoordinationService.cs index 99a74ae2e..483303186 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/StubSessionCoordinationService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/StubSessionCoordinationService.cs @@ -9,9 +9,9 @@ namespace UnitTests.Common; internal class StubSessionCoordinationService : ISessionCoordinationService { - public Task ProcessExpirationAsync(UserSession session, CT _) => Task.CompletedTask; + public Task ProcessExpirationAsync(UserSession session, Ct _) => Task.CompletedTask; - public Task ProcessLogoutAsync(UserSession session, CT _) => Task.CompletedTask; + public Task ProcessLogoutAsync(UserSession session, Ct _) => Task.CompletedTask; - public Task ValidateSessionAsync(SessionValidationRequest request, CT _) => Task.FromResult(true); + public Task ValidateSessionAsync(SessionValidationRequest request, Ct _) => Task.FromResult(true); } diff --git a/identity-server/test/IdentityServer.UnitTests/Common/TestEventService.cs b/identity-server/test/IdentityServer.UnitTests/Common/TestEventService.cs index 9e24eaf15..9ca2041f5 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/TestEventService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/TestEventService.cs @@ -11,7 +11,7 @@ public class TestEventService : IEventService { private Dictionary _events = new Dictionary(); - public Task RaiseAsync(Event evt, CT ct) + public Task RaiseAsync(Event evt, Ct ct) { _events.Add(evt.GetType(), evt); return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Common/TestReplayCache.cs b/identity-server/test/IdentityServer.UnitTests/Common/TestReplayCache.cs index 7ff2367ae..e5a4ed7f5 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/TestReplayCache.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/TestReplayCache.cs @@ -13,13 +13,13 @@ public class TestReplayCache : IReplayCache public TestReplayCache(TimeProvider clock) => _timeProvider = clock; - public Task AddAsync(string purpose, string handle, DateTimeOffset expiration, CT ct) + public Task AddAsync(string purpose, string handle, DateTimeOffset expiration, Ct ct) { _values[purpose + handle] = expiration; return Task.CompletedTask; } - public Task ExistsAsync(string purpose, string handle, CT ct) + public Task ExistsAsync(string purpose, string handle, Ct ct) { if (_values.TryGetValue(purpose + handle, out var expiration)) { diff --git a/identity-server/test/IdentityServer.UnitTests/Common/TestUserConsentStore.cs b/identity-server/test/IdentityServer.UnitTests/Common/TestUserConsentStore.cs index 46098acd6..996b8b9c2 100644 --- a/identity-server/test/IdentityServer.UnitTests/Common/TestUserConsentStore.cs +++ b/identity-server/test/IdentityServer.UnitTests/Common/TestUserConsentStore.cs @@ -20,9 +20,9 @@ public class TestUserConsentStore : IUserConsentStore new DefaultHandleGenerationService(), TestLogger.Create()); - public Task StoreUserConsentAsync(Consent consent, CT ct) => _userConsentStore.StoreUserConsentAsync(consent, ct); + public Task StoreUserConsentAsync(Consent consent, Ct ct) => _userConsentStore.StoreUserConsentAsync(consent, ct); - public Task GetUserConsentAsync(string subjectId, string clientId, CT ct) => _userConsentStore.GetUserConsentAsync(subjectId, clientId, ct); + public Task GetUserConsentAsync(string subjectId, string clientId, Ct ct) => _userConsentStore.GetUserConsentAsync(subjectId, clientId, ct); - public Task RemoveUserConsentAsync(string subjectId, string clientId, CT ct) => _userConsentStore.RemoveUserConsentAsync(subjectId, clientId, ct); + public Task RemoveUserConsentAsync(string subjectId, string clientId, Ct ct) => _userConsentStore.RemoveUserConsentAsync(subjectId, clientId, ct); } diff --git a/identity-server/test/IdentityServer.UnitTests/Cors/MockCorsPolicyService.cs b/identity-server/test/IdentityServer.UnitTests/Cors/MockCorsPolicyService.cs index b76f068f5..c3f46aeff 100644 --- a/identity-server/test/IdentityServer.UnitTests/Cors/MockCorsPolicyService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Cors/MockCorsPolicyService.cs @@ -11,7 +11,7 @@ public class MockCorsPolicyService : ICorsPolicyService public bool WasCalled { get; set; } public bool Response { get; set; } - public Task IsOriginAllowedAsync(string origin, CT ct) + public Task IsOriginAllowedAsync(string origin, Ct ct) { WasCalled = true; return Task.FromResult(Response); diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/AuthorizeEndpointBaseTests.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/AuthorizeEndpointBaseTests.cs index d414e0179..047ecb325 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/AuthorizeEndpointBaseTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/AuthorizeEndpointBaseTests.cs @@ -50,7 +50,7 @@ public class AuthorizeEndpointBaseTests private ValidatedAuthorizeRequest _validatedAuthorizeRequest; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public AuthorizeEndpointBaseTests() => Init(); diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeInteractionResponseGenerator.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeInteractionResponseGenerator.cs index e72db93a7..f8f809e2c 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeInteractionResponseGenerator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeInteractionResponseGenerator.cs @@ -12,5 +12,5 @@ internal class StubAuthorizeInteractionResponseGenerator : IAuthorizeInteraction { internal InteractionResponse Response { get; set; } = new InteractionResponse(); - public Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, CT ct) => Task.FromResult(Response); + public Task ProcessInteractionAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, Ct ct) => Task.FromResult(Response); } diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeRequestValidator.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeRequestValidator.cs index 8dcf503bf..3da7a016b 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeRequestValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/Authorize/StubAuthorizeRequestValidator.cs @@ -12,7 +12,7 @@ public class StubAuthorizeRequestValidator : IAuthorizeRequestValidator { public AuthorizeRequestValidationResult Result { get; set; } - public Task ValidateAsync(NameValueCollection parameters, CT ct, ClaimsPrincipal subject = null, AuthorizeRequestType authorizeRequestType = AuthorizeRequestType.Authorize) + public Task ValidateAsync(NameValueCollection parameters, Ct ct, ClaimsPrincipal subject = null, AuthorizeRequestType authorizeRequestType = AuthorizeRequestType.Authorize) { Result.ValidatedRequest.Raw = parameters; return Task.FromResult(Result); diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubBackChannelLogoutClient.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubBackChannelLogoutClient.cs index 6e2119bf2..85f0aa780 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubBackChannelLogoutClient.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubBackChannelLogoutClient.cs @@ -11,7 +11,7 @@ internal class StubBackChannelLogoutClient : IBackChannelLogoutService { public bool SendLogoutsWasCalled { get; set; } - public Task SendLogoutNotificationsAsync(LogoutNotificationContext context, CT _) + public Task SendLogoutNotificationsAsync(LogoutNotificationContext context, Ct _) { SendLogoutsWasCalled = true; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubEndSessionRequestValidator.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubEndSessionRequestValidator.cs index f873f6a64..09f7f542f 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubEndSessionRequestValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/EndSession/StubEndSessionRequestValidator.cs @@ -13,7 +13,7 @@ internal class StubEndSessionRequestValidator : IEndSessionRequestValidator public EndSessionValidationResult EndSessionValidationResult { get; set; } = new EndSessionValidationResult(); public EndSessionCallbackValidationResult EndSessionCallbackValidationResult { get; set; } = new EndSessionCallbackValidationResult(); - public Task ValidateAsync(NameValueCollection parameters, ClaimsPrincipal subject, CT ct) => Task.FromResult(EndSessionValidationResult); + public Task ValidateAsync(NameValueCollection parameters, ClaimsPrincipal subject, Ct ct) => Task.FromResult(EndSessionValidationResult); - public Task ValidateCallbackAsync(NameValueCollection parameters, CT ct) => Task.FromResult(EndSessionCallbackValidationResult); + public Task ValidateCallbackAsync(NameValueCollection parameters, Ct ct) => Task.FromResult(EndSessionCallbackValidationResult); } diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/Results/AuthorizeResultTests.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/Results/AuthorizeResultTests.cs index a3e1262fd..be347e577 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/Results/AuthorizeResultTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/Results/AuthorizeResultTests.cs @@ -23,7 +23,7 @@ namespace UnitTests.Endpoints.Results; public class AuthorizeResultTests { private AuthorizeHttpWriter _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private AuthorizeResponse _response = new AuthorizeResponse(); private IdentityServerOptions _options = new IdentityServerOptions(); diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubClientSecretValidator.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubClientSecretValidator.cs index 75de77876..914bbdf7c 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubClientSecretValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubClientSecretValidator.cs @@ -11,5 +11,5 @@ internal class StubClientSecretValidator : IClientSecretValidator { public ClientSecretValidationResult Result { get; set; } - public Task ValidateAsync(HttpContext context, CT ct) => Task.FromResult(Result); + public Task ValidateAsync(HttpContext context, Ct ct) => Task.FromResult(Result); } diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenRequestValidator.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenRequestValidator.cs index 07b1ce69f..0fc38094f 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenRequestValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenRequestValidator.cs @@ -10,5 +10,5 @@ internal class StubTokenRequestValidator : ITokenRequestValidator { public TokenRequestValidationResult Result { get; set; } - public Task ValidateRequestAsync(TokenRequestValidationContext context, CT _) => Task.FromResult(Result); + public Task ValidateRequestAsync(TokenRequestValidationContext context, Ct _) => Task.FromResult(Result); } diff --git a/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenResponseGenerator.cs b/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenResponseGenerator.cs index 81e6dabec..6dd689130 100644 --- a/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenResponseGenerator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Endpoints/Token/StubTokenResponseGenerator.cs @@ -11,5 +11,5 @@ internal class StubTokenResponseGenerator : ITokenResponseGenerator { public TokenResponse Response { get; set; } = new TokenResponse(); - public Task ProcessAsync(TokenRequestValidationResult validationResult, CT _) => Task.FromResult(Response); + public Task ProcessAsync(TokenRequestValidationResult validationResult, Ct _) => Task.FromResult(Response); } diff --git a/identity-server/test/IdentityServer.UnitTests/Extensions/IResourceStoreExtensionsTests.cs b/identity-server/test/IdentityServer.UnitTests/Extensions/IResourceStoreExtensionsTests.cs index 11671b251..3bd380084 100644 --- a/identity-server/test/IdentityServer.UnitTests/Extensions/IResourceStoreExtensionsTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Extensions/IResourceStoreExtensionsTests.cs @@ -9,7 +9,7 @@ namespace UnitTests.Extensions; public class IResourceStoreExtensionsTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task GetAllEnabledResourcesAsync_on_duplicate_identity_scopes_should_fail() @@ -148,7 +148,7 @@ public class IResourceStoreExtensionsTests public List ApiResources { get; set; } = new List(); public List ApiScopes { get; set; } = new List(); - public Task> FindApiResourcesByNameAsync(IEnumerable names, CT ct) + public Task> FindApiResourcesByNameAsync(IEnumerable names, Ct ct) { var apis = from a in ApiResources where names.Contains(a.Name) @@ -156,7 +156,7 @@ public class IResourceStoreExtensionsTests return Task.FromResult(apis); } - public Task> FindApiResourcesByScopeNameAsync(IEnumerable names, CT ct) + public Task> FindApiResourcesByScopeNameAsync(IEnumerable names, Ct ct) { ArgumentNullException.ThrowIfNull(names); @@ -167,7 +167,7 @@ public class IResourceStoreExtensionsTests return Task.FromResult(api); } - public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable names, CT ct) + public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable names, Ct ct) { ArgumentNullException.ThrowIfNull(names); @@ -178,7 +178,7 @@ public class IResourceStoreExtensionsTests return Task.FromResult(identity); } - public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, CT ct) + public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, Ct ct) { var q = from x in ApiScopes where scopeNames.Contains(x.Name) @@ -186,7 +186,7 @@ public class IResourceStoreExtensionsTests return Task.FromResult(q); } - public Task GetAllResourcesAsync(CT ct) + public Task GetAllResourcesAsync(Ct ct) { var result = new Resources(IdentityResources, ApiResources, ApiScopes); return Task.FromResult(result); diff --git a/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCacheStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCacheStoreTests.cs index 1b873cfe0..9dfeb1b0a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCacheStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCacheStoreTests.cs @@ -13,24 +13,24 @@ public class IdentityServerBuilderExtensionsCacheStoreTests { private class CustomClientStore : IClientStore { - public Task FindClientByIdAsync(string clientId, CT _) => throw new System.NotImplementedException(); + public Task FindClientByIdAsync(string clientId, Ct _) => throw new System.NotImplementedException(); #if NET10_0_OR_GREATER - public IAsyncEnumerable GetAllClientsAsync(CT _) => throw new System.NotImplementedException(); + public IAsyncEnumerable GetAllClientsAsync(Ct _) => throw new System.NotImplementedException(); #endif } private class CustomResourceStore : IResourceStore { - public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) => throw new System.NotImplementedException(); + public Task> FindIdentityResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) => throw new System.NotImplementedException(); - public Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, CT ct) => throw new System.NotImplementedException(); + public Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames, Ct ct) => throw new System.NotImplementedException(); - public Task> FindApiResourcesByNameAsync(IEnumerable names, CT ct) => throw new System.NotImplementedException(); + public Task> FindApiResourcesByNameAsync(IEnumerable names, Ct ct) => throw new System.NotImplementedException(); - public Task GetAllResourcesAsync(CT ct) => throw new System.NotImplementedException(); + public Task GetAllResourcesAsync(Ct ct) => throw new System.NotImplementedException(); - public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, CT ct) => throw new System.NotImplementedException(); + public Task> FindApiScopesByNameAsync(IEnumerable scopeNames, Ct ct) => throw new System.NotImplementedException(); } [Fact] diff --git a/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCryptoTests.cs b/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCryptoTests.cs index 42b63b962..c01c1ea8a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCryptoTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Extensions/IdentityServerBuilderExtensionsCryptoTests.cs @@ -30,7 +30,7 @@ public class IdentityServerBuilderExtensionsCryptoTests "p": "25dkucyCSqxRcJpRrhl7PXqw7wqBZeLQgYlZLpK493PdM8pFfq+/LK1hFtxIjdFKqXS/TOikB4YCBMEH0Im3HZ8Lo0dub3SWNhdegJyRjMbcoO+A9YSODEj7DFaNpZtdmtDi1n6etJm66ctPSR20NNpzoYZuaJ92fVQiKiOh6Qs=", "q": "yDKBrS8l1DOx4dwP9hdwhqZJ3XahidiIZSL7m46I/6+cjaki/1mtNiA60MOgqTKegP7Fo7jAYvliqQwnvVGmQvLv19cfKywlIuKN9DdkLHnKh75hfo7aakEbO7GJ5zVgsNnKOdf8wvpclfvIuRDEVva4cksPzsJy6K7C8ENCSCM=", "dp": "GlYJ6o6wgawxCEQ5z5uWwETau5CS/Fk7kI2ceI14SZVHzlJQC2WglAcnQcqhmQCk57Xsy5iLM6vKyi8sdMJPh+nvR2HlyNA+w7YBy4L7odqn01VmLgv7zVVjZpNq4ZXEoDC1Q+xjtF1LoYaUt7wsRLp+a7znuPyHBXj1sAAeBwk=", - "dq": "W8OK3S83T8VCTBzq1Ap6cb3XLcQq11yBaJpYaj0zXr/IKsbUW+dnFeBAFWEWS3gAX3Bod1tAFB3rs0D3FjhO1XE1ruHUT520iAEAwGiDaj+JLh994NzqELo3GW2PoIM/BtFNeKYgHd9UgQsgPnQJCzOb6Aev/z3yHeW9RRQPVbE=", + "dq": "W8OK3S83T8VCtBzq1Ap6cb3XLcQq11yBaJpYaj0zXr/IKsbUW+dnFeBAFWEWS3gAX3Bod1tAFB3rs0D3FjhO1XE1ruHUT520iAEAwGiDaj+JLh994NzqELo3GW2PoIM/BtFNeKYgHd9UgQsgPnQJCzOb6Aev/z3yHeW9RRQPVbE=", "qi": "w4KdmiDN1GtK71JxaasqmEKPNfV3v2KZDXKnfyhUsdx/idKbdTVjvMOkxFPJ4FqV4yIVn06f3QHTm4NEG18Diqxsrzd6kXQIHOa858tLsCcmt9FoGfrgCFgVceh3K/Zah/r8rl9Y61u0Z1kZumwMvFpFE+mVU01t9HgTEAVkHTc=" } """; diff --git a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/DiagnosticSummaryTests.cs b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/DiagnosticSummaryTests.cs index 81ce35be3..52b43e610 100644 --- a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/DiagnosticSummaryTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/DiagnosticSummaryTests.cs @@ -13,7 +13,7 @@ namespace IdentityServer.UnitTests.Licensing.V2; public class DiagnosticSummaryTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task PrintSummary_ShouldCallWriteAsyncOnEveryDiagnosticEntry() diff --git a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseAccessorTests.cs b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseAccessorTests.cs index d5ab00c1f..7ebd4874e 100644 --- a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseAccessorTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseAccessorTests.cs @@ -96,10 +96,10 @@ public class LicenseAccessorTests // Redistribution licenses [6684, new DateTime(2024,11,15), LicenseEdition.Enterprise, true, "contact@duendesoftware.com", "_test", false, false, 5, null, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiRW50ZXJwcmlzZSIsImlkIjoiNjY4NCIsImZlYXR1cmUiOiJpc3YiLCJwcm9kdWN0IjoiVEJEIn0.Y-bbdSsdHHzrJs40CpEIsgi7ugc8ScTa2ArCuL-wM__O6znygAUTGOLrzhFaeRibud5lNXSYaA0vkkF1UFQS4HJF_wTMe5pYH4DT1vVYaVXd9Xyqn-klQvBLcoo4JAoFNau0Az-czbo6UBkejKn-7QDnJunFcHaYenDpzgsXHiaK4mkIMRI_OnBYKegNa_xvYRRzorKkT3x8q1n7vUnx80-b6Jf2Y0u6fPsLwE2Or-VBXRpTGL20MBtcPS56wQDDdl4eKkW716lHS-Iyh5KW3K5HVKRxd86ot18MY6Bd3PPUQocFYXd5KhTH_YKvwVqAUkc0MhHYJLFV_5Q8qSRECA"], [6683, new DateTime(2024,11,15), LicenseEdition.Business, true, "contact@duendesoftware.com", "_test", false, false, 5, 1, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiQnVzaW5lc3MiLCJpZCI6IjY2ODMiLCJmZWF0dXJlIjoiaXN2IiwicHJvZHVjdCI6IlRCRCJ9.rYDrY6UUKgZfnfx7GA1PILYj9XICIjC9aS06P8rUAuXYjxiagEIEkacKt3GcccJI6k0lMb6qbd3Hv-Q9rDDyDSxUZxwvGzVlhRrIditOI38FoN3trUd5RU6S7A_RSDd4uV0L1T8NKUKGlOvu8_7egcIy-E8q34GA5BNU2lV2Gsaa7yWAyTKZh7YPIP4y_TwLxOcw2GRn6dQq73-O_XaAIf0AxFowW1GsiBrirzE_TKwJ8VkbvN3O-yVT-ntPvoK0tHRKoG5yh8GPuDORQtlis_5bZHHFzazXVMul1rkYWSU9OhIdixvI44q1q1_5VGoGJ3SLFIFsdWM0ZvnPx7_Bqg"], - [6682, new DateTime(2024,11,15), LicenseEdition.Starter, true, "contact@duendesoftware.com", "_test", false, false, 5, 1, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiU3RhcnRlciIsImlkIjoiNjY4MiIsImZlYXR1cmUiOiJpc3YiLCJwcm9kdWN0IjoiVEJEIn0.Ag4HLR1TVJ2VYgW1MJbpIHvAerx7zaHoM4CLu7baipsZVwc82ZkmLUeO_yB3CqN7N6XepofwZ-RcloxN8UGZ6qPRGQPE1cOMrp8YqxLOI38gJbxALOBG5BB6YTCMf_TKciXn1c3XhrsxVDayMGxAU68fKDCg1rnamBehZfXr2uENipNPkGDh_iuRw2MUgeGY96CGvwCC5R0E6UnvGZbjQ7dFYV-CkAHuE8dEAr0pX_gD77YsYcSxq5rNUavcNnWV7-3knFwozNqi02wTDpcKtqaL2mAr0nRof1E8Df9C8RwCTWXSaWhr9_47W2I1r_IhLYS2Jnq6m_3BgAIvWL4cjQ"], + [6682, new DateTime(2024,11,15), LicenseEdition.Starter, true, "contact@duendesoftware.com", "_test", false, false, 5, 1, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiU3RhcnRlciIsImlkIjoiNjY4MiIsImZlYXR1cmUiOiJpc3YiLCJwcm9kdWN0IjoiVEJEIn0.Ag4HLR1TVJ2VYgW1MJbpIHvAerx7zaHoM4CLu7baipsZVwc82ZkmLUeO_yB3CqN7N6XepofwZ-RcloxN8UGZ6qPRGQPE1cOMrp8YqxLOI38gJbxALOBG5BB6YTCMf_TKciXn1c3XhrsxVDayMGxAU68fKDCg1rnamBehZfXr2uENipNPkGDh_iuRw2MUgeGY96CGvwCC5R0E6UnvGZbjQ7dFYV-CkAHuE8dEAr0pX_gD77YsYcSxq5rNUavcNnWV7-3knFwozNqi02wTDpcKtqaL2mAr0nRof1E8Df9C8RwCtWXSaWhr9_47W2I1r_IhLYS2Jnq6m_3BgAIvWL4cjQ"], // Licenses with extra features - [6681, new DateTime(2024,11,15), LicenseEdition.Business, false, "joe@duendesoftware.com", "_test", true, false, 15, 1, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJCdXNpbmVzcyIsImlkIjoiNjY4MSIsImZlYXR1cmUiOiJkeW5hbWljX3Byb3ZpZGVycyJ9.HeCNt4O1cXsw4Ujkn2W_sDRmWUDstYtLPQ7UhYvneUgxed7auFyroBJojkwh9RwflWD1HphHYx4KRuZML_OO0BYzGr865gWI55x6KxHM5mxY5hpVJMTLottSgIv-hyXdNxTWCxP1jluzs1b4JgWmXnU83AuRtAenMpZpZcOY7Pldkd84JA1BXE5gEM6v2U8HCTgydY1QmTd_RjYlicGqmDOkKALiHOxREyXLsRgy4pmQfG6gs99heXdzs2k4jRLLXsTFHP7UxupRTYDPCgXT19ub6l4KG95rPBSMV_vXEwydcFGJe1uFQdd1btUSVe50XX1hmZx4P4SymlX0iuimMg"], + [6681, new DateTime(2024,11,15), LicenseEdition.Business, false, "joe@duendesoftware.com", "_test", true, false, 15, 1, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJCdXNpbmVzcyIsImlkIjoiNjY4MSIsImZlYXR1cmUiOiJkeW5hbWljX3Byb3ZpZGVycyJ9.HeCNt4O1cXsw4Ujkn2W_sDRmWUDstYtLPQ7UhYvneUgxed7auFyroBJojkwh9RwflWD1HphHYx4KRuZML_OO0BYzGr865gWI55x6KxHM5mxY5hpVJMTLottSgIv-hyXdNxTWCxP1jluzs1b4JgWmXnU83AuRtAenMpZpZcOY7Pldkd84JA1BXE5gEM6v2U8HCtgydY1QmTd_RjYlicGqmDOkKALiHOxREyXLsRgy4pmQfG6gs99heXdzs2k4jRLLXsTFHP7UxupRTYDPCgXT19ub6l4KG95rPBSMV_vXEwydcFGJe1uFQdd1btUSVe50XX1hmZx4P4SymlX0iuimMg"], [6680, new DateTime(2024,11,15), LicenseEdition.Starter, false, "joe@duendesoftware.com", "_test", false, true, 5, 1, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJTdGFydGVyIiwiaWQiOiI2NjgwIiwiZmVhdHVyZSI6ImtleV9tYW5hZ2VtZW50In0.kmArT0vjFE4nhRNg_kchOh_uklaqm3KeworQ9up_4jIBOinbZtVv3NkXtJoHX_lzjs1ftp0eNMSyGg6E29GR7ZZ2hx3SQdQrSdrH4v_sNSFcRZrwzipXBkANssH-0hMQ0s3kdfXdwfmN_8IfCkPCugeMemwUWwbC7QHBdCa6Fr7ZExuMNLpml932D72LMzhlLf780BSic9PKn6odvzGikYK9e2WhYL1zL0REdNHzgwrrUZHesZF98u-gel7skS1Frg6cBcPl_QSSP5KhxmfdPw0b2FUM_B0Tpi-gN54efz0stzccjr9PgcpAfXO82y3vOBB7f44cdv6DG67YwAvv0A"], [8672, new DateTime(2025,08,01), LicenseEdition.Starter, false, "joe@duendesoftware.com", "Joe DeCock - Testing License", false, false, null, null, "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZUtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzIyNDcwNDAwLCJleHAiOjE3NTQwMDY0MDAsImNvbXBhbnlfbmFtZSI6IkpvZSBEZUNvY2sgLSBUZXN0aW5nIExpY2Vuc2UiLCJjb250YWN0X2luZm8iOiJqb2VAZHVlbmRlc29mdHdhcmUuY29tIiwiZWRpdGlvbiI6IlN0YXJ0ZXIiLCJpZCI6Ijg2NzIiLCJmZWF0dXJlIjpbInVubGltaXRlZF9jbGllbnRzIiwidW5saW1pdGVkX2lzc3VlcnMiXX0.etCmaFaSqlQPpJlNyJppE2MyG6Yl7lq_DiBW7J4dFm8IEh70pxPBpmuOCnvkWeber7Ugbj8qzWNtSSaiWEenkOh1oQe9UzrTlyyfkj_i6rhbRRzFtRs8qOLjj3mSwJp533whUjYhSr9j0eLfU8CQ6vSEnP96nNY_ngAyWz-0sb6CYu2RCQ9042ZVPmtF4H6ZmWvCAzm7Dz2THMokC9SR7G6njSLxx3mXGuUHXjfPCHTAeTZ6lsivoSvGX8jjYCvdxAXceQrBzmnu6Z2WB0hMcRqZC5Fvtk6LK9LPjcXdWZDDgD1jHoGk84_YcAeWkogtbY2WzZxF0n9UkdYugHHPKA"], ]; diff --git a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseExpirationCheckerTests.cs b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseExpirationCheckerTests.cs index c36de4c6c..5afb2377a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseExpirationCheckerTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseExpirationCheckerTests.cs @@ -84,7 +84,7 @@ public class LicenseExpirationCheckerTests //Starter Standard with Key Management feature "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJTdGFydGVyIiwiaWQiOiI2NjgwIiwiZmVhdHVyZSI6ImtleV9tYW5hZ2VtZW50In0.kmArT0vjFE4nhRNg_kchOh_uklaqm3KeworQ9up_4jIBOinbZtVv3NkXtJoHX_lzjs1ftp0eNMSyGg6E29GR7ZZ2hx3SQdQrSdrH4v_sNSFcRZrwzipXBkANssH-0hMQ0s3kdfXdwfmN_8IfCkPCugeMemwUWwbC7QHBdCa6Fr7ZExuMNLpml932D72LMzhlLf780BSic9PKn6odvzGikYK9e2WhYL1zL0REdNHzgwrrUZHesZF98u-gel7skS1Frg6cBcPl_QSSP5KhxmfdPw0b2FUM_B0Tpi-gN54efz0stzccjr9PgcpAfXO82y3vOBB7f44cdv6DG67YwAvv0A", //Business Standard with Dynamic Providers feature - "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJCdXNpbmVzcyIsImlkIjoiNjY4MSIsImZlYXR1cmUiOiJkeW5hbWljX3Byb3ZpZGVycyJ9.HeCNt4O1cXsw4Ujkn2W_sDRmWUDstYtLPQ7UhYvneUgxed7auFyroBJojkwh9RwflWD1HphHYx4KRuZML_OO0BYzGr865gWI55x6KxHM5mxY5hpVJMTLottSgIv-hyXdNxTWCxP1jluzs1b4JgWmXnU83AuRtAenMpZpZcOY7Pldkd84JA1BXE5gEM6v2U8HCTgydY1QmTd_RjYlicGqmDOkKALiHOxREyXLsRgy4pmQfG6gs99heXdzs2k4jRLLXsTFHP7UxupRTYDPCgXT19ub6l4KG95rPBSMV_vXEwydcFGJe1uFQdd1btUSVe50XX1hmZx4P4SymlX0iuimMg", + "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJCdXNpbmVzcyIsImlkIjoiNjY4MSIsImZlYXR1cmUiOiJkeW5hbWljX3Byb3ZpZGVycyJ9.HeCNt4O1cXsw4Ujkn2W_sDRmWUDstYtLPQ7UhYvneUgxed7auFyroBJojkwh9RwflWD1HphHYx4KRuZML_OO0BYzGr865gWI55x6KxHM5mxY5hpVJMTLottSgIv-hyXdNxTWCxP1jluzs1b4JgWmXnU83AuRtAenMpZpZcOY7Pldkd84JA1BXE5gEM6v2U8HCtgydY1QmTd_RjYlicGqmDOkKALiHOxREyXLsRgy4pmQfG6gs99heXdzs2k4jRLLXsTFHP7UxupRTYDPCgXT19ub6l4KG95rPBSMV_vXEwydcFGJe1uFQdd1btUSVe50XX1hmZx4P4SymlX0iuimMg", //Enterprise Standard "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJFbnRlcnByaXNlIiwiaWQiOiI2Njg1In0.UgguIFVBciR8lpTF5RuM3FNcIm8m8wGR4Mt0xOCgo-XknFwXBpxOfr0zVjciGboteOl9AFtrqZLopEjsYXGFh2dkl5AzRyq--Ai5y7aezszlMpq8SkjRRCeBUYLNnEO41_YnfjYhNrcmb0Jx9wMomCv74vU3f8Hulz1ppWtoL-MVcGq0fhv_KOCP49aImCgiawPJ6a_bfs2C1QLpj-GG411OhdyrO9QLIH_We4BEvRUyajraisljB1VQzC8Q6188Mm_BLwl4ZENPaoNE4egiqTAuoTS5tb1l732-CGZwpGuU80NSpJbrUc6jd3rVi_pNf_1rH-O4Xt0HRCWiNCDYgg", //Community @@ -94,7 +94,7 @@ public class LicenseExpirationCheckerTests public static TheoryData RedistributionLicenseKeys => [ //Starter Redistribution - "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiU3RhcnRlciIsImlkIjoiNjY4MiIsImZlYXR1cmUiOiJpc3YiLCJwcm9kdWN0IjoiVEJEIn0.Ag4HLR1TVJ2VYgW1MJbpIHvAerx7zaHoM4CLu7baipsZVwc82ZkmLUeO_yB3CqN7N6XepofwZ-RcloxN8UGZ6qPRGQPE1cOMrp8YqxLOI38gJbxALOBG5BB6YTCMf_TKciXn1c3XhrsxVDayMGxAU68fKDCg1rnamBehZfXr2uENipNPkGDh_iuRw2MUgeGY96CGvwCC5R0E6UnvGZbjQ7dFYV-CkAHuE8dEAr0pX_gD77YsYcSxq5rNUavcNnWV7-3knFwozNqi02wTDpcKtqaL2mAr0nRof1E8Df9C8RwCTWXSaWhr9_47W2I1r_IhLYS2Jnq6m_3BgAIvWL4cjQ", + "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiU3RhcnRlciIsImlkIjoiNjY4MiIsImZlYXR1cmUiOiJpc3YiLCJwcm9kdWN0IjoiVEJEIn0.Ag4HLR1TVJ2VYgW1MJbpIHvAerx7zaHoM4CLu7baipsZVwc82ZkmLUeO_yB3CqN7N6XepofwZ-RcloxN8UGZ6qPRGQPE1cOMrp8YqxLOI38gJbxALOBG5BB6YTCMf_TKciXn1c3XhrsxVDayMGxAU68fKDCg1rnamBehZfXr2uENipNPkGDh_iuRw2MUgeGY96CGvwCC5R0E6UnvGZbjQ7dFYV-CkAHuE8dEAr0pX_gD77YsYcSxq5rNUavcNnWV7-3knFwozNqi02wTDpcKtqaL2mAr0nRof1E8Df9C8RwCtWXSaWhr9_47W2I1r_IhLYS2Jnq6m_3BgAIvWL4cjQ", //Business Redistribution "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiQnVzaW5lc3MiLCJpZCI6IjY2ODMiLCJmZWF0dXJlIjoiaXN2IiwicHJvZHVjdCI6IlRCRCJ9.rYDrY6UUKgZfnfx7GA1PILYj9XICIjC9aS06P8rUAuXYjxiagEIEkacKt3GcccJI6k0lMb6qbd3Hv-Q9rDDyDSxUZxwvGzVlhRrIditOI38FoN3trUd5RU6S7A_RSDd4uV0L1T8NKUKGlOvu8_7egcIy-E8q34GA5BNU2lV2Gsaa7yWAyTKZh7YPIP4y_TwLxOcw2GRn6dQq73-O_XaAIf0AxFowW1GsiBrirzE_TKwJ8VkbvN3O-yVT-ntPvoK0tHRKoG5yh8GPuDORQtlis_5bZHHFzazXVMul1rkYWSU9OhIdixvI44q1q1_5VGoGJ3SLFIFsdWM0ZvnPx7_Bqg", //Enterprise Redistribution diff --git a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs index 22dedd3af..cddb3cb53 100644 --- a/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Licensing/v2/LicenseUsageTests.cs @@ -288,6 +288,6 @@ public class LicenseUsageTests "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiam9lQGR1ZW5kZXNvZnR3YXJlLmNvbSIsImVkaXRpb24iOiJFbnRlcnByaXNlIiwiaWQiOiI2Njg1In0.UgguIFVBciR8lpTF5RuM3FNcIm8m8wGR4Mt0xOCgo-XknFwXBpxOfr0zVjciGboteOl9AFtrqZLopEjsYXGFh2dkl5AzRyq--Ai5y7aezszlMpq8SkjRRCeBUYLNnEO41_YnfjYhNrcmb0Jx9wMomCv74vU3f8Hulz1ppWtoL-MVcGq0fhv_KOCP49aImCgiawPJ6a_bfs2C1QLpj-GG411OhdyrO9QLIH_We4BEvRUyajraisljB1VQzC8Q6188Mm_BLwl4ZENPaoNE4egiqTAuoTS5tb1l732-CGZwpGuU80NSpJbrUc6jd3rVi_pNf_1rH-O4Xt0HRCWiNCDYgg"; public const string RedistributionStarterLicense = - "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiU3RhcnRlciIsImlkIjoiNjY4MiIsImZlYXR1cmUiOiJpc3YiLCJwcm9kdWN0IjoiVEJEIn0.Ag4HLR1TVJ2VYgW1MJbpIHvAerx7zaHoM4CLu7baipsZVwc82ZkmLUeO_yB3CqN7N6XepofwZ-RcloxN8UGZ6qPRGQPE1cOMrp8YqxLOI38gJbxALOBG5BB6YTCMf_TKciXn1c3XhrsxVDayMGxAU68fKDCg1rnamBehZfXr2uENipNPkGDh_iuRw2MUgeGY96CGvwCC5R0E6UnvGZbjQ7dFYV-CkAHuE8dEAr0pX_gD77YsYcSxq5rNUavcNnWV7-3knFwozNqi02wTDpcKtqaL2mAr0nRof1E8Df9C8RwCTWXSaWhr9_47W2I1r_IhLYS2Jnq6m_3BgAIvWL4cjQ"; + "eyJhbGciOiJQUzI1NiIsImtpZCI6IklkZW50aXR5U2VydmVyTGljZW5zZWtleS83Y2VhZGJiNzgxMzA0NjllODgwNjg5MTAyNTQxNGYxNiIsInR5cCI6ImxpY2Vuc2Urand0In0.eyJpc3MiOiJodHRwczovL2R1ZW5kZXNvZnR3YXJlLmNvbSIsImF1ZCI6IklkZW50aXR5U2VydmVyIiwiaWF0IjoxNzMwNDE5MjAwLCJleHAiOjE3MzE2Mjg4MDAsImNvbXBhbnlfbmFtZSI6Il90ZXN0IiwiY29udGFjdF9pbmZvIjoiY29udGFjdEBkdWVuZGVzb2Z0d2FyZS5jb20iLCJlZGl0aW9uIjoiU3RhcnRlciIsImlkIjoiNjY4MiIsImZlYXR1cmUiOiJpc3YiLCJwcm9kdWN0IjoiVEJEIn0.Ag4HLR1TVJ2VYgW1MJbpIHvAerx7zaHoM4CLu7baipsZVwc82ZkmLUeO_yB3CqN7N6XepofwZ-RcloxN8UGZ6qPRGQPE1cOMrp8YqxLOI38gJbxALOBG5BB6YTCMf_TKciXn1c3XhrsxVDayMGxAU68fKDCg1rnamBehZfXr2uENipNPkGDh_iuRw2MUgeGY96CGvwCC5R0E6UnvGZbjQ7dFYV-CkAHuE8dEAr0pX_gD77YsYcSxq5rNUavcNnWV7-3knFwozNqi02wTDpcKtqaL2mAr0nRof1E8Df9C8RwCtWXSaWhr9_47W2I1r_IhLYS2Jnq6m_3BgAIvWL4cjQ"; } } diff --git a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests.cs b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests.cs index b9f00c18d..694e61831 100644 --- a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests.cs @@ -18,7 +18,7 @@ public class AuthorizeInteractionResponseGeneratorTests private Duende.IdentityServer.ResponseHandling.AuthorizeInteractionResponseGenerator _subject; private MockConsentService _mockConsentService = new MockConsentService(); private FakeTimeProvider _timeProvider = new FakeTimeProvider(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public AuthorizeInteractionResponseGeneratorTests() => _subject = new Duende.IdentityServer.ResponseHandling.AuthorizeInteractionResponseGenerator( _options, diff --git a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Consent.cs b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Consent.cs index e96c7bc3d..f6455502b 100644 --- a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Consent.cs +++ b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Consent.cs @@ -18,7 +18,7 @@ public class AuthorizeInteractionResponseGeneratorTests_Consent private IdentityServerOptions _options = new IdentityServerOptions(); private MockConsentService _mockConsent = new MockConsentService(); private MockProfileService _fakeUserService = new MockProfileService(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private void RequiresConsent(bool value) => _mockConsent.RequiresConsentResult = value; diff --git a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Custom.cs b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Custom.cs index 1a0532a09..48692cb6f 100644 --- a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Custom.cs +++ b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Custom.cs @@ -27,7 +27,7 @@ public class CustomAuthorizeInteractionResponseGenerator : Duende.IdentityServer } public InteractionResponse ProcessLoginResponse { get; set; } - protected internal override Task ProcessLoginAsync(ValidatedAuthorizeRequest request, CT ct) + protected internal override Task ProcessLoginAsync(ValidatedAuthorizeRequest request, Ct ct) { if (ProcessLoginResponse != null) { @@ -38,7 +38,7 @@ public class CustomAuthorizeInteractionResponseGenerator : Duende.IdentityServer } public InteractionResponse ProcessConsentResponse { get; set; } - protected internal override Task ProcessConsentAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, CT ct) + protected internal override Task ProcessConsentAsync(ValidatedAuthorizeRequest request, ConsentResponse consent, Ct ct) { if (ProcessConsentResponse != null) { @@ -54,7 +54,7 @@ public class AuthorizeInteractionResponseGeneratorTests_Custom private CustomAuthorizeInteractionResponseGenerator _subject; private MockConsentService _mockConsentService = new MockConsentService(); private FakeTimeProvider _timeProvider = new FakeTimeProvider(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public AuthorizeInteractionResponseGeneratorTests_Custom() => _subject = new CustomAuthorizeInteractionResponseGenerator( _options, diff --git a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Login.cs b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Login.cs index aad989c88..a7ff911aa 100644 --- a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Login.cs +++ b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/AuthorizeInteractionResponseGenerator/AuthorizeInteractionResponseGeneratorTests_Login.cs @@ -19,7 +19,7 @@ public class AuthorizeInteractionResponseGeneratorTests_Login private Duende.IdentityServer.ResponseHandling.AuthorizeInteractionResponseGenerator _subject; private MockConsentService _mockConsentService = new MockConsentService(); private FakeTimeProvider _timeProvider = new FakeTimeProvider(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public AuthorizeInteractionResponseGeneratorTests_Login() => _subject = new Duende.IdentityServer.ResponseHandling.AuthorizeInteractionResponseGenerator( _options, diff --git a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/DeviceAuthorizationResponseGeneratorTests.cs b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/DeviceAuthorizationResponseGeneratorTests.cs index 9d89e32a9..d99b96342 100644 --- a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/DeviceAuthorizationResponseGeneratorTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/DeviceAuthorizationResponseGeneratorTests.cs @@ -17,7 +17,7 @@ namespace UnitTests.ResponseHandling; public class DeviceAuthorizationResponseGeneratorTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private readonly List identityResources = new List { new IdentityResources.OpenId(), new IdentityResources.Profile() }; private readonly List apiResources = new List { new ApiResource("resource") { Scopes = { "api1" } } }; private readonly List scopes = new List { new ApiScope("api1") }; @@ -193,7 +193,7 @@ internal class FakeUserCodeGenerator : IUserCodeGenerator set => retryLimit = value; } - public Task GenerateAsync(CT ct) + public Task GenerateAsync(Ct ct) { if (tryCount == 0) { diff --git a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/UserInfoResponseGeneratorTests.cs b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/UserInfoResponseGeneratorTests.cs index d5d462047..ba66d7497 100644 --- a/identity-server/test/IdentityServer.UnitTests/ResponseHandling/UserInfoResponseGeneratorTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/ResponseHandling/UserInfoResponseGeneratorTests.cs @@ -15,7 +15,7 @@ namespace UnitTests.ResponseHandling; public class UserInfoResponseGeneratorTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private UserInfoResponseGenerator _subject; private MockProfileService _mockProfileService = new MockProfileService(); diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackChannelLogoutServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackChannelLogoutServiceTests.cs index cb57041d5..b6ace2bc0 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackChannelLogoutServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackChannelLogoutServiceTests.cs @@ -17,7 +17,7 @@ namespace UnitTests.Services.Default; public class DefaultBackChannelLogoutServiceTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private class ServiceTestHarness : DefaultBackChannelLogoutService { public ServiceTestHarness( @@ -33,7 +33,7 @@ public class DefaultBackChannelLogoutServiceTests // CreateTokenAsync is protected, so we use this wrapper to exercise it in our tests - public async Task ExerciseCreateTokenAsync(BackChannelLogoutRequest request, CT ct) => await CreateTokenAsync(request, ct); + public async Task ExerciseCreateTokenAsync(BackChannelLogoutRequest request, Ct ct) => await CreateTokenAsync(request, ct); } [Fact] diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackchannelAuthenticationInteractionServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackchannelAuthenticationInteractionServiceTests.cs index 5c1796c86..930169ac1 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackchannelAuthenticationInteractionServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultBackchannelAuthenticationInteractionServiceTests.cs @@ -16,7 +16,7 @@ public class DefaultBackchannelAuthenticationInteractionServiceTests { private Client _client; private DefaultBackchannelAuthenticationInteractionService _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private MockBackChannelAuthenticationRequestStore _mockStore = new MockBackChannelAuthenticationRequestStore(); private InMemoryClientStore _clientStore; diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultClaimsServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultClaimsServiceTests.cs index bd67f8a51..f1783131e 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultClaimsServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultClaimsServiceTests.cs @@ -17,7 +17,7 @@ public class DefaultClaimsServiceTests { private DefaultClaimsService _subject; private MockProfileService _mockMockProfileService = new MockProfileService(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private ClaimsPrincipal _user; private Client _client; diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultConsentServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultConsentServiceTests.cs index 3f2ec973d..c800ce871 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultConsentServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultConsentServiceTests.cs @@ -23,7 +23,7 @@ public class DefaultConsentServiceTests private Client _client; private TestUserConsentStore _userConsentStore = new TestUserConsentStore(); private FakeTimeProvider _timeProvider = new FakeTimeProvider(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private DateTime now; diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultCorsPolicyServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultCorsPolicyServiceTests.cs index ab3f00433..e413c5680 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultCorsPolicyServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultCorsPolicyServiceTests.cs @@ -12,7 +12,7 @@ public class DefaultCorsPolicyServiceTests private const string Category = "DefaultCorsPolicyService"; private DefaultCorsPolicyService subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public DefaultCorsPolicyServiceTests() => subject = new DefaultCorsPolicyService(TestLogger.Create()); diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultEventServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultEventServiceTests.cs index 79ed3133e..dbe544bd2 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultEventServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultEventServiceTests.cs @@ -10,7 +10,7 @@ namespace UnitTests.Services.Default; public class DefaultEventServiceTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task Raising_an_event_without_http_context_does_not_throw() { diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultIdentityServerInteractionServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultIdentityServerInteractionServiceTests.cs index ce8b04568..33c387aa0 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultIdentityServerInteractionServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultIdentityServerInteractionServiceTests.cs @@ -16,7 +16,7 @@ namespace UnitTests.Services.Default; public class DefaultIdentityServerInteractionServiceTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private DefaultIdentityServerInteractionService _subject; diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultPersistedGrantServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultPersistedGrantServiceTests.cs index 64cbbe39e..2f069e823 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultPersistedGrantServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultPersistedGrantServiceTests.cs @@ -22,7 +22,7 @@ public class DefaultPersistedGrantServiceTests private IUserConsentStore _userConsent; private ClaimsPrincipal _user = new IdentityServerUser("123").CreatePrincipal(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public DefaultPersistedGrantServiceTests() { @@ -576,7 +576,7 @@ public class DefaultPersistedGrantServiceTests public CorruptingPersistedGrantStore(IPersistedGrantStore inner) => _inner = inner; - public async Task> GetAllAsync(PersistedGrantFilter filter, CT ct) + public async Task> GetAllAsync(PersistedGrantFilter filter, Ct ct) { var items = await _inner.GetAllAsync(filter, ct); if (ClientIdToCorrupt != null) @@ -590,12 +590,12 @@ public class DefaultPersistedGrantServiceTests return items; } - public Task GetAsync(string key, CT ct) => _inner.GetAsync(key, ct); + public Task GetAsync(string key, Ct ct) => _inner.GetAsync(key, ct); - public Task RemoveAllAsync(PersistedGrantFilter filter, CT ct) => _inner.RemoveAllAsync(filter, ct); + public Task RemoveAllAsync(PersistedGrantFilter filter, Ct ct) => _inner.RemoveAllAsync(filter, ct); - public Task RemoveAsync(string key, CT ct) => _inner.RemoveAsync(key, ct); + public Task RemoveAsync(string key, Ct ct) => _inner.RemoveAsync(key, ct); - public Task StoreAsync(PersistedGrant grant, CT ct) => _inner.StoreAsync(grant, ct); + public Task StoreAsync(PersistedGrant grant, Ct ct) => _inner.StoreAsync(grant, ct); } } diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultRefreshTokenServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultRefreshTokenServiceTests.cs index b8ad52437..4f32bd9fd 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultRefreshTokenServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultRefreshTokenServiceTests.cs @@ -21,7 +21,7 @@ public class DefaultRefreshTokenServiceTests private ClaimsPrincipal _user = new IdentityServerUser("123").CreatePrincipal(); private FakeTimeProvider _timeProvider = new FakeTimeProvider(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public DefaultRefreshTokenServiceTests() { diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultSessionCoordinationServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultSessionCoordinationServiceTests.cs index 1e541621b..92555f3f9 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultSessionCoordinationServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultSessionCoordinationServiceTests.cs @@ -13,7 +13,7 @@ namespace UnitTests.Services.Default; public class DefaultSessionCoordinationServiceTests { public DefaultSessionCoordinationService Service; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task Handles_missing_client_null_reference() diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultTokenServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultTokenServiceTests.cs index b5ccbd81c..af95c3669 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultTokenServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultTokenServiceTests.cs @@ -17,7 +17,7 @@ namespace UnitTests.Services.Default; public class DefaultTokenServiceTests { private DefaultTokenService _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private MockClaimsService _mockClaimsService = new MockClaimsService(); private MockReferenceTokenStore _mockReferenceTokenStore = new MockReferenceTokenStore(); diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUiLocalesServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUiLocalesServiceTests.cs index eeae5d33f..d1ffcc812 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUiLocalesServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUiLocalesServiceTests.cs @@ -15,7 +15,7 @@ namespace UnitTests.Services.Default; public class DefaultUiLocalesServiceTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private readonly DefaultHttpContext _httpContext; private readonly HttpContextAccessor _httpContextAccessor; private readonly RequestLocalizationOptions _requestLocalizationOptions; diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUserSessionTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUserSessionTests.cs index b4a4a1bc3..68f9a050e 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUserSessionTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DefaultUserSessionTests.cs @@ -17,7 +17,7 @@ namespace UnitTests.Services.Default; public class DefaultUserSessionTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private DefaultUserSession _subject; private MockHttpContextAccessor _mockHttpContext = new MockHttpContextAccessor(); diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/DistributedDeviceFlowThrottlingServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/DistributedDeviceFlowThrottlingServiceTests.cs index 552590132..679465854 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/DistributedDeviceFlowThrottlingServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/DistributedDeviceFlowThrottlingServiceTests.cs @@ -16,7 +16,7 @@ public class DistributedDeviceFlowThrottlingServiceTests { private TestCache cache = new TestCache(); private InMemoryClientStore _store; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private readonly IdentityServerOptions options = new IdentityServerOptions { DeviceFlow = new DeviceFlowOptions { Interval = 5 } }; private readonly DeviceCode deviceCode = new DeviceCode diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/InMemoryKeyStoreCacheTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/InMemoryKeyStoreCacheTests.cs index 077ce31ab..efab38136 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/InMemoryKeyStoreCacheTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/InMemoryKeyStoreCacheTests.cs @@ -10,7 +10,7 @@ namespace UnitTests.Services.Default.KeyManagement; public class InMemoryKeyStoreCacheTests { private InMemoryKeyStoreCache _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private FakeTimeProvider _mockTimeProvider = new FakeTimeProvider(new DateTimeOffset(new DateTime(2018, 3, 1, 9, 0, 0))); public InMemoryKeyStoreCacheTests() => _subject = new InMemoryKeyStoreCache(_mockTimeProvider); diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/KeyManagerTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/KeyManagerTests.cs index db59a77e5..4ce844018 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/KeyManagerTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/KeyManagerTests.cs @@ -18,7 +18,7 @@ public class KeyManagerTests { private KeyManager _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private SigningAlgorithmOptions _rsaOptions = new SigningAlgorithmOptions("RS256"); diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStore.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStore.cs index b6a649fbe..40abdae83 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStore.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStore.cs @@ -13,7 +13,7 @@ internal class MockSigningKeyStore : ISigningKeyStore public bool LoadKeysAsyncWasCalled { get; set; } public bool DeleteWasCalled { get; set; } - public Task DeleteKeyAsync(string id, CT ct) + public Task DeleteKeyAsync(string id, Ct ct) { DeleteWasCalled = true; if (Keys != null) @@ -23,13 +23,13 @@ internal class MockSigningKeyStore : ISigningKeyStore return Task.CompletedTask; } - public Task> LoadKeysAsync(CT ct) + public Task> LoadKeysAsync(Ct ct) { LoadKeysAsyncWasCalled = true; return Task.FromResult>(Keys); } - public Task StoreKeyAsync(SerializedKey key, CT ct) + public Task StoreKeyAsync(SerializedKey key, Ct ct) { if (Keys == null) { diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStoreCache.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStoreCache.cs index 249c4f3a3..6cb644691 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStoreCache.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/KeyManagement/MockSigningKeyStoreCache.cs @@ -14,13 +14,13 @@ internal class MockSigningKeyStoreCache : ISigningKeyStoreCache public bool StoreKeysAsyncWasCalled { get; set; } public TimeSpan StoreKeysAsyncDuration { get; set; } - public Task> GetKeysAsync(CT ct) + public Task> GetKeysAsync(Ct ct) { GetKeysAsyncWasCalled = true; return Task.FromResult(Cache.AsEnumerable()); } - public Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, CT ct) + public Task StoreKeysAsync(IEnumerable keys, TimeSpan duration, Ct ct) { StoreKeysAsyncWasCalled = true; StoreKeysAsyncDuration = duration; diff --git a/identity-server/test/IdentityServer.UnitTests/Services/Default/NumericUserCodeServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/Default/NumericUserCodeServiceTests.cs index 86d549cfc..f0fc86ad7 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/Default/NumericUserCodeServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/Default/NumericUserCodeServiceTests.cs @@ -8,7 +8,7 @@ namespace UnitTests.Services.Default; public class NumericUserCodeGeneratorTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task GenerateAsync_should_return_expected_code() diff --git a/identity-server/test/IdentityServer.UnitTests/Services/DiagnosticDataServiceTests.cs b/identity-server/test/IdentityServer.UnitTests/Services/DiagnosticDataServiceTests.cs index 9598893c1..40b6bafb6 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/DiagnosticDataServiceTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/DiagnosticDataServiceTests.cs @@ -10,7 +10,7 @@ namespace IdentityServer.UnitTests.Services; public class DiagnosticDataServiceTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task GetJsonBytesAsync_WithNoEntries_ShouldReturnEmptyJsonObject() diff --git a/identity-server/test/IdentityServer.UnitTests/Services/InMemory/InMemoryCorsPolicyService.cs b/identity-server/test/IdentityServer.UnitTests/Services/InMemory/InMemoryCorsPolicyService.cs index 314f32ed1..dae6886b8 100644 --- a/identity-server/test/IdentityServer.UnitTests/Services/InMemory/InMemoryCorsPolicyService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Services/InMemory/InMemoryCorsPolicyService.cs @@ -14,7 +14,7 @@ public class InMemoryCorsPolicyServiceTests private InMemoryCorsPolicyService _subject; private List _clients = new List(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public InMemoryCorsPolicyServiceTests() => _subject = new InMemoryCorsPolicyService(TestLogger.Create(), _clients); diff --git a/identity-server/test/IdentityServer.UnitTests/Stores/Default/CachingResourceStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Stores/Default/CachingResourceStoreTests.cs index 6916ab087..6ec4c6096 100644 --- a/identity-server/test/IdentityServer.UnitTests/Stores/Default/CachingResourceStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Stores/Default/CachingResourceStoreTests.cs @@ -11,7 +11,7 @@ namespace UnitTests.Stores.Default; public class CachingResourceStoreTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private List _identityResources = new List(); private List _apiResources = new List(); diff --git a/identity-server/test/IdentityServer.UnitTests/Stores/Default/DefaultPersistedGrantStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Stores/Default/DefaultPersistedGrantStoreTests.cs index 609f4b018..69ce868a3 100644 --- a/identity-server/test/IdentityServer.UnitTests/Stores/Default/DefaultPersistedGrantStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Stores/Default/DefaultPersistedGrantStoreTests.cs @@ -22,7 +22,7 @@ public class DefaultPersistedGrantStoreTests private StubHandleGenerationService _stubHandleGenerationService = new StubHandleGenerationService(); private ClaimsPrincipal _user = new IdentityServerUser("123").CreatePrincipal(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public DefaultPersistedGrantStoreTests() { diff --git a/identity-server/test/IdentityServer.UnitTests/Stores/Default/DistributedCacheAuthorizationParametersMessageStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Stores/Default/DistributedCacheAuthorizationParametersMessageStoreTests.cs index 38c8ae2ed..f45c85303 100644 --- a/identity-server/test/IdentityServer.UnitTests/Stores/Default/DistributedCacheAuthorizationParametersMessageStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Stores/Default/DistributedCacheAuthorizationParametersMessageStoreTests.cs @@ -13,7 +13,7 @@ public class DistributedCacheAuthorizationParametersMessageStoreTests { private MockDistributedCache _mockCache = new MockDistributedCache(); private DistributedCacheAuthorizationParametersMessageStore _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public DistributedCacheAuthorizationParametersMessageStoreTests() => _subject = new DistributedCacheAuthorizationParametersMessageStore(_mockCache, new DefaultHandleGenerationService()); [Fact] diff --git a/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryClientStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryClientStoreTests.cs index 3669f1712..82dada2ae 100644 --- a/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryClientStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryClientStoreTests.cs @@ -9,7 +9,7 @@ namespace UnitTests.Stores; public class InMemoryClientStoreTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public void InMemoryClient_should_throw_if_contain_duplicate_client_ids() { diff --git a/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryDeviceFlowStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryDeviceFlowStoreTests.cs index e0b1a031e..195d2a93b 100644 --- a/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryDeviceFlowStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryDeviceFlowStoreTests.cs @@ -10,7 +10,7 @@ namespace UnitTests.Stores; public class InMemoryDeviceFlowStoreTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private InMemoryDeviceFlowStore _store = new InMemoryDeviceFlowStore(); [Fact] diff --git a/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryPersistedGrantStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryPersistedGrantStoreTests.cs index 95ae353bf..35cbe00a7 100644 --- a/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryPersistedGrantStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Stores/InMemoryPersistedGrantStoreTests.cs @@ -10,7 +10,7 @@ namespace UnitTests.Stores; public class InMemoryPersistedGrantStoreTests { private InMemoryPersistedGrantStore _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public InMemoryPersistedGrantStoreTests() => _subject = new InMemoryPersistedGrantStore(); diff --git a/identity-server/test/IdentityServer.UnitTests/Stores/ValidatingClientStoreTests.cs b/identity-server/test/IdentityServer.UnitTests/Stores/ValidatingClientStoreTests.cs index be738566c..652de7611 100644 --- a/identity-server/test/IdentityServer.UnitTests/Stores/ValidatingClientStoreTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Stores/ValidatingClientStoreTests.cs @@ -18,7 +18,7 @@ public class ValidatingClientStoreTests { private readonly TestEventService _events = new(); private readonly NullLogger> _logger = new(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] public async Task GetAllClientsAsync_WhenAllClientsAreValid_ShouldReturnAllClients() @@ -153,9 +153,9 @@ public class ValidatingClientStoreTests public static StubClientStore WithClients(IEnumerable clients) => new(clients.FirstOrDefault(), clients); - public Task FindClientByIdAsync(string clientId, CT _) => Task.FromResult(_client); + public Task FindClientByIdAsync(string clientId, Ct _) => Task.FromResult(_client); - public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] CT _) + public async IAsyncEnumerable GetAllClientsAsync([EnumeratorCancellation] Ct _) { foreach (var client in _clients) { @@ -182,7 +182,7 @@ public class ValidatingClientStoreTests _errorMessage = errorMessage; } - public Task ValidateAsync(ClientConfigurationValidationContext context, CT ct) + public Task ValidateAsync(ClientConfigurationValidationContext context, Ct ct) { var isValid = _validationFunc != null ? _validationFunc(context.Client) : _isValid; @@ -201,7 +201,7 @@ public class ValidatingClientStoreTests public bool CanRaiseEventType(EventTypes evtType) => true; - public Task RaiseAsync(Event evt, CT ct) + public Task RaiseAsync(Event evt, Ct ct) { RaisedEventCount++; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AccessTokenValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AccessTokenValidation.cs index e957d7cb3..ad71b819a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AccessTokenValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AccessTokenValidation.cs @@ -16,7 +16,7 @@ namespace UnitTests.Validation; public class AccessTokenValidation { private const string Category = "Access token validation"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IClientStore _clients = Factory.CreateClientStore(); private IdentityServerOptions _options = new IdentityServerOptions(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Code.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Code.cs index 56c9bfa36..f28a064a2 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Code.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Code.cs @@ -13,7 +13,7 @@ namespace UnitTests.Validation.AuthorizeRequest_Validation; public class Authorize_ClientValidation_Code { private IdentityServerOptions _options = TestIdentityServerOptions.Create(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", "AuthorizeRequest Client Validation - Code")] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_IdToken.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_IdToken.cs index 77783beab..e9332d4d5 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_IdToken.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_IdToken.cs @@ -13,7 +13,7 @@ namespace UnitTests.Validation.AuthorizeRequest_Validation; public class Authorize_ClientValidation_IdToken { private IdentityServerOptions _options = TestIdentityServerOptions.Create(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", "AuthorizeRequest Client Validation - IdToken")] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Invalid.cs index 046057556..4783ad84a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Invalid.cs @@ -13,7 +13,7 @@ namespace UnitTests.Validation.AuthorizeRequest_Validation; public class Authorize_ClientValidation_Invalid { private const string Category = "AuthorizeRequest Client Validation - Invalid"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerOptions _options = TestIdentityServerOptions.Create(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Token.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Token.cs index 4e38e4549..db84ead51 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Token.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Token.cs @@ -13,7 +13,7 @@ namespace UnitTests.Validation.AuthorizeRequest_Validation; public class Authorize_ClientValidation_Token { private const string Category = "AuthorizeRequest Client Validation - Token"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerOptions _options = TestIdentityServerOptions.Create(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Valid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Valid.cs index ac4d544bb..b0eb1e004 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Valid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ClientValidation_Valid.cs @@ -13,7 +13,7 @@ namespace UnitTests.Validation.AuthorizeRequest_Validation; public class Authorize_ClientValidation_Valid { private const string Category = "AuthorizeRequest Client Validation - Valid"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerOptions _options = TestIdentityServerOptions.Create(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_CustomValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_CustomValidator.cs index 803015ffb..66c5c3466 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_CustomValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_CustomValidator.cs @@ -60,7 +60,7 @@ public class StubAuthorizeRequestValidator : ICustomAuthorizeRequestValidator public Action Callback; public bool WasCalled { get; set; } - public Task ValidateAsync(CustomAuthorizeRequestValidationContext context, CT ct) + public Task ValidateAsync(CustomAuthorizeRequestValidationContext context, Ct ct) { WasCalled = true; Callback?.Invoke(context); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs index 1f8013cf5..287ca92aa 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Resources.cs @@ -20,7 +20,7 @@ namespace UnitTests.Validation.AuthorizeRequest_Validation; public class Authorize_ProtocolValidation_Resources { private const string Category = "AuthorizeRequest Protocol Validation - Resources"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private readonly AuthorizeRequestValidator _subject; diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Valid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Valid.cs index 3c05ebea7..377d69c99 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Valid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/AuthorizeRequest Validation/Authorize_ProtocolValidation_Valid.cs @@ -12,7 +12,7 @@ namespace UnitTests.Validation.AuthorizeRequest_Validation; public class Authorize_ProtocolValidation_Valid { private const string Category = "AuthorizeRequest Protocol Validation - Valid"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/DPoPProofValidatorTests.cs b/identity-server/test/IdentityServer.UnitTests/Validation/DPoPProofValidatorTests.cs index 43c5b0928..10e235640 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/DPoPProofValidatorTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/DPoPProofValidatorTests.cs @@ -23,7 +23,7 @@ namespace UnitTests.Validation; public class DPoPProofValidatorTests { private const string Category = "DPoP validator tests"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerOptions _options = new IdentityServerOptions(); private FakeTimeProvider _timeProvider = new FakeTimeProvider(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/DeviceCodeValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/DeviceCodeValidation.cs index 8c590a26a..a5020a566 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/DeviceCodeValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/DeviceCodeValidation.cs @@ -15,7 +15,7 @@ public class DeviceCodeValidation { private const string Category = "Device code validation"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private readonly IClientStore _clients = Factory.CreateClientStore(); private readonly DeviceCode deviceCode = new DeviceCode diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/EndSessionRequestValidatorTests.cs b/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/EndSessionRequestValidatorTests.cs index 5a1bbf168..1383f27ba 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/EndSessionRequestValidatorTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/EndSessionRequestValidatorTests.cs @@ -17,7 +17,7 @@ public class EndSessionRequestValidatorTests { private EndSessionRequestValidator _subject; private IdentityServerOptions _options; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private StubTokenValidator _stubTokenValidator = new StubTokenValidator(); private StubRedirectUriValidator _stubRedirectUriValidator = new StubRedirectUriValidator(); private MockUserSession _userSession = new MockUserSession(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubRedirectUriValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubRedirectUriValidator.cs index 84005f56c..90f9d4df0 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubRedirectUriValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubRedirectUriValidator.cs @@ -12,7 +12,7 @@ public class StubRedirectUriValidator : IRedirectUriValidator public bool IsRedirectUriValid { get; set; } public bool IsPostLogoutRedirectUriValid { get; set; } - public Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, CT ct) => Task.FromResult(IsPostLogoutRedirectUriValid); + public Task IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client, Ct ct) => Task.FromResult(IsPostLogoutRedirectUriValid); #pragma warning disable CS0618 public Task IsRedirectUriValidAsync(string requestedUri, Client client) => Task.FromResult(IsRedirectUriValid); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubTokenValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubTokenValidator.cs index 1206ea5be..07843770c 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubTokenValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/EndSessionRequestValidation/StubTokenValidator.cs @@ -11,7 +11,7 @@ public class StubTokenValidator : ITokenValidator public TokenValidationResult AccessTokenValidationResult { get; set; } = new TokenValidationResult(); public TokenValidationResult IdentityTokenValidationResult { get; set; } = new TokenValidationResult(); - public Task ValidateAccessTokenAsync(string token, string expectedScope, CT ct) => Task.FromResult(AccessTokenValidationResult); + public Task ValidateAccessTokenAsync(string token, string expectedScope, Ct ct) => Task.FromResult(AccessTokenValidationResult); - public Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, CT ct) => Task.FromResult(IdentityTokenValidationResult); + public Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, Ct ct) => Task.FromResult(IdentityTokenValidationResult); } diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/IdentityTokenValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/IdentityTokenValidation.cs index 7a14bcc89..a6cd4ee1b 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/IdentityTokenValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/IdentityTokenValidation.cs @@ -14,7 +14,7 @@ namespace UnitTests.Validation; public class IdentityTokenValidation { private const string Category = "Identity token validation"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; static IdentityTokenValidation() => JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/IntrospectionRequestValidatorTests.cs b/identity-server/test/IdentityServer.UnitTests/Validation/IntrospectionRequestValidatorTests.cs index 24a8ecb6e..9e41788bc 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/IntrospectionRequestValidatorTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/IntrospectionRequestValidatorTests.cs @@ -15,7 +15,7 @@ namespace UnitTests.Validation; public class IntrospectionRequestValidatorTests { private const string Category = "Introspection request validation"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IntrospectionRequestValidator _subject; private IReferenceTokenStore _referenceTokenStore; diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/IsLocalUrlTests.cs b/identity-server/test/IdentityServer.UnitTests/Validation/IsLocalUrlTests.cs index 02d3f2d99..5edb465f3 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/IsLocalUrlTests.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/IsLocalUrlTests.cs @@ -13,7 +13,7 @@ namespace UnitTests.Validation; public class IsLocalUrlTests { - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private const string queryParameters = "?client_id=mvc.code" + "&redirect_uri=https%3A%2F%2Flocalhost%3A44302%2Fsignin-oidc" + diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/ResourceValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/ResourceValidation.cs index 0f5edb27d..ac101f1a4 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/ResourceValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/ResourceValidation.cs @@ -103,7 +103,7 @@ public class ResourceValidation }; private IResourceStore _subject; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public ResourceValidation() => _subject = new InMemoryResourcesStore(_identityResources, _apiResources, _scopes); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/BasicAuthenticationCredentialParsing.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/BasicAuthenticationCredentialParsing.cs index afe327b47..265839cef 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/BasicAuthenticationCredentialParsing.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/BasicAuthenticationCredentialParsing.cs @@ -16,7 +16,7 @@ namespace UnitTests.Validation.Secrets; public class BasicAuthenticationSecretParsing { private const string Category = "Secrets - Basic Authentication Secret Parsing"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerOptions _options; private BasicAuthenticationSecretParser _parser; diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/ClientAssertionSecretParsing.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/ClientAssertionSecretParsing.cs index 651340ef2..c8c72c3a9 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/ClientAssertionSecretParsing.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/ClientAssertionSecretParsing.cs @@ -18,7 +18,7 @@ public class ClientAssertionSecretParsing { private IdentityServerOptions _options; private JwtBearerClientAssertionSecretParser _parser; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public ClientAssertionSecretParsing() { diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/FormPostCredentialParsing.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/FormPostCredentialParsing.cs index bfede3a2d..e9edb09f3 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/FormPostCredentialParsing.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/FormPostCredentialParsing.cs @@ -15,7 +15,7 @@ namespace UnitTests.Validation.Secrets; public class FormPostCredentialExtraction { private const string Category = "Secrets - Form Post Secret Parsing"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IdentityServerOptions _options; private PostBodySecretParser _parser; diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/HashedSharedSecretValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/HashedSharedSecretValidation.cs index d48c7974e..2fd3a13a5 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/HashedSharedSecretValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/HashedSharedSecretValidation.cs @@ -17,7 +17,7 @@ public class HashedSharedSecretValidation private ISecretValidator _validator = new HashedSharedSecretValidator(new Logger(new LoggerFactory())); private IClientStore _clients = new InMemoryClientStore(ClientValidationTestClients.Get()); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/MutualTlsSecretValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/MutualTlsSecretValidation.cs index a1906a2fc..44df513f6 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/MutualTlsSecretValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/MutualTlsSecretValidation.cs @@ -17,7 +17,7 @@ public class MutualTlsSecretValidation private const string Category = "Secrets - MutualTls Secret Validation"; private IClientStore _clients = new InMemoryClientStore(ClientValidationTestClients.Get()); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; /////////////////// // thumbprints diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PlainTextClientSecretValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PlainTextClientSecretValidation.cs index e8696e0e6..557c0af2e 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PlainTextClientSecretValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PlainTextClientSecretValidation.cs @@ -17,7 +17,7 @@ public class PlainTextClientSecretValidation private ISecretValidator _validator = new PlainTextSharedSecretValidator(new Logger(new LoggerFactory())); private IClientStore _clients = new InMemoryClientStore(ClientValidationTestClients.Get()); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PrivateKeyJwtSecretValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PrivateKeyJwtSecretValidation.cs index f3edd8cc3..bb590466d 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PrivateKeyJwtSecretValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/PrivateKeyJwtSecretValidation.cs @@ -25,7 +25,7 @@ public class PrivateKeyJwtSecretValidation private readonly ISecretValidator _validator; private readonly IClientStore _clients; private readonly IdentityServerOptions _options; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public PrivateKeyJwtSecretValidation() { diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/SecretValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/SecretValidation.cs index 62e1350f4..b6f02f5c7 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/SecretValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Secrets/SecretValidation.cs @@ -21,7 +21,7 @@ public class SecretValidation private IClientStore _clients = new InMemoryClientStore(ClientValidationTestClients.Get()); private SecretValidator _validator; private IdentityServerOptions _options = new IdentityServerOptions(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; public SecretValidation() => _validator = new SecretValidator( new FakeTimeProvider(DateTimeOffset.UtcNow), diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestBackchannelAuthenticationRequestIdValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestBackchannelAuthenticationRequestIdValidator.cs index 77778b9ab..385ac1140 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestBackchannelAuthenticationRequestIdValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestBackchannelAuthenticationRequestIdValidator.cs @@ -14,7 +14,7 @@ internal class TestBackchannelAuthenticationRequestIdValidator : IBackchannelAut //public DeviceCode DeviceCodeResult { get; set; } = new DeviceCode(); - public Task ValidateAsync(BackchannelAuthenticationRequestIdValidationContext context, CT ct) + public Task ValidateAsync(BackchannelAuthenticationRequestIdValidationContext context, Ct ct) { if (shouldError) { diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceCodeValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceCodeValidator.cs index 67e9c6059..f1a86ab42 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceCodeValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceCodeValidator.cs @@ -15,7 +15,7 @@ public class TestDeviceCodeValidator : IDeviceCodeValidator public TestDeviceCodeValidator(bool shouldError = false) => this.shouldError = shouldError; - public Task ValidateAsync(DeviceCodeValidationContext context, CT ct) + public Task ValidateAsync(DeviceCodeValidationContext context, Ct ct) { if (shouldError) { diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceFlowThrottlingService.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceFlowThrottlingService.cs index c1cc9698d..26d4b072f 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceFlowThrottlingService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestDeviceFlowThrottlingService.cs @@ -13,5 +13,5 @@ public class TestDeviceFlowThrottlingService : IDeviceFlowThrottlingService public TestDeviceFlowThrottlingService(bool shouldSlownDown = false) => this.shouldSlownDown = shouldSlownDown; - public Task ShouldSlowDown(string deviceCode, DeviceCode details, CT _) => Task.FromResult(shouldSlownDown); + public Task ShouldSlowDown(string deviceCode, DeviceCode details, Ct _) => Task.FromResult(shouldSlownDown); } diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestGrantValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestGrantValidator.cs index e8b507c7d..6acdec82e 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestGrantValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestGrantValidator.cs @@ -28,7 +28,7 @@ internal class TestGrantValidator : IExtensionGrantValidator return Task.FromResult(new GrantValidationResult("bob", "CustomGrant")); } - public Task ValidateAsync(ExtensionGrantValidationContext context, CT ct) + public Task ValidateAsync(ExtensionGrantValidationContext context, Ct ct) { if (_isInvalid) { diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestIssuerNameService.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestIssuerNameService.cs index cddeacc2c..aa6dd531a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestIssuerNameService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestIssuerNameService.cs @@ -12,5 +12,5 @@ internal class TestIssuerNameService : IIssuerNameService public TestIssuerNameService(string value = null) => _value = value ?? "https://identityserver"; - public Task GetCurrentAsync(CT ct) => Task.FromResult(_value); + public Task GetCurrentAsync(Ct ct) => Task.FromResult(_value); } diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestProfileService.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestProfileService.cs index 92e418f86..08754d467 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestProfileService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestProfileService.cs @@ -13,9 +13,9 @@ internal class TestProfileService : IProfileService public TestProfileService(bool shouldBeActive = true) => _shouldBeActive = shouldBeActive; - public Task GetProfileDataAsync(ProfileDataRequestContext context, CT ct) => Task.CompletedTask; + public Task GetProfileDataAsync(ProfileDataRequestContext context, Ct ct) => Task.CompletedTask; - public Task IsActiveAsync(IsActiveContext context, CT ct) + public Task IsActiveAsync(IsActiveContext context, Ct ct) { context.IsActive = _shouldBeActive; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestPushedAuthorizationService.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestPushedAuthorizationService.cs index a097c4442..7efb96bb1 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestPushedAuthorizationService.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestPushedAuthorizationService.cs @@ -15,19 +15,19 @@ internal class TestPushedAuthorizationService : IPushedAuthorizationService private Dictionary pushedRequests = new(); - public Task ConsumeAsync(string referenceValue, CT ct) + public Task ConsumeAsync(string referenceValue, Ct ct) { pushedRequests.Remove(referenceValue); return Task.CompletedTask; } - public Task GetPushedAuthorizationRequestAsync(string referenceValue, CT ct) + public Task GetPushedAuthorizationRequestAsync(string referenceValue, Ct ct) { pushedRequests.TryGetValue(referenceValue, out var par); return Task.FromResult(par); } - public Task StoreAsync(DeserializedPushedAuthorizationRequest request, CT ct) + public Task StoreAsync(DeserializedPushedAuthorizationRequest request, Ct ct) { pushedRequests[request.ReferenceValue] = request; return Task.CompletedTask; diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestResourceOwnerPasswordValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestResourceOwnerPasswordValidator.cs index ffcd225ad..67991879a 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestResourceOwnerPasswordValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestResourceOwnerPasswordValidator.cs @@ -23,7 +23,7 @@ public class TestResourceOwnerPasswordValidator : IResourceOwnerPasswordValidato _erroDescription = errorDescription; } - public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, CT ct) + public Task ValidateAsync(ResourceOwnerPasswordValidationContext context, Ct ct) { if (_sendError) { diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestTokenValidator.cs b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestTokenValidator.cs index 058894069..d600fe247 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestTokenValidator.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/Setup/TestTokenValidator.cs @@ -12,7 +12,7 @@ internal class TestTokenValidator : ITokenValidator public TestTokenValidator(TokenValidationResult result) => _result = result; - public Task ValidateAccessTokenAsync(string token, string expectedScope, CT ct) => Task.FromResult(_result); + public Task ValidateAccessTokenAsync(string token, string expectedScope, Ct ct) => Task.FromResult(_result); - public Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, CT ct) => Task.FromResult(_result); + public Task ValidateIdentityTokenAsync(string token, string clientId, bool validateLifetime, Ct ct) => Task.FromResult(_result); } diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ClientCredentials_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ClientCredentials_Invalid.cs index f607fc19d..88de8f2fd 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ClientCredentials_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ClientCredentials_Invalid.cs @@ -14,7 +14,7 @@ public class TokenRequestValidation_ClientCredentials_Invalid private const string Category = "TokenRequest Validation - ClientCredentials - Invalid"; private IClientStore _clients = Factory.CreateClientStore(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Code_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Code_Invalid.cs index 64b107e4d..a61214cf3 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Code_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Code_Invalid.cs @@ -19,7 +19,7 @@ public class TokenRequestValidation_Code_Invalid { private IClientStore _clients = Factory.CreateClientStore(); private const string Category = "TokenRequest Validation - AuthorizationCode - Invalid"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private ClaimsPrincipal _subject = new IdentityServerUser("bob").CreatePrincipal(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_DeviceCode_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_DeviceCode_Invalid.cs index a3729ec58..023e3f898 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_DeviceCode_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_DeviceCode_Invalid.cs @@ -17,7 +17,7 @@ public class TokenRequestValidation_DeviceCode_Invalid { private const string Category = "TokenRequest Validation - DeviceCode - Invalid"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private readonly IClientStore _clients = Factory.CreateClientStore(); private readonly DeviceCode deviceCode = new DeviceCode diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ExtensionGrants_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ExtensionGrants_Invalid.cs index fc21066d8..3036c215c 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ExtensionGrants_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ExtensionGrants_Invalid.cs @@ -14,7 +14,7 @@ public class TokenRequestValidation_ExtensionGrants_Invalid private const string Category = "TokenRequest Validation - Extension Grants - Invalid"; private IClientStore _clients = Factory.CreateClientStore(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_General_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_General_Invalid.cs index 32a5c328c..baba8ad17 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_General_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_General_Invalid.cs @@ -18,7 +18,7 @@ public class TokenRequestValidation_General_Invalid private IClientStore _clients = new InMemoryClientStore(TestClients.Get()); private ClaimsPrincipal _subject = new IdentityServerUser("bob").CreatePrincipal(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Invalid.cs index a073cc8d0..48d6feb2e 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Invalid.cs @@ -16,7 +16,7 @@ public class TokenRequestValidation_Invalid private const string Category = "TokenRequest Validation - General - Invalid"; private readonly IClientStore _clients = Factory.CreateClientStore(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_PKCE.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_PKCE.cs index 3dc2db638..5c64cfb8e 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_PKCE.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_PKCE.cs @@ -21,7 +21,7 @@ public class TokenRequestValidation_PKCE private IClientStore _clients = Factory.CreateClientStore(); private InputLengthRestrictions lengths = new InputLengthRestrictions(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Theory] [InlineData("codeclient.pkce")] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_RefreshToken_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_RefreshToken_Invalid.cs index 5a09032df..d428c1b6f 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_RefreshToken_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_RefreshToken_Invalid.cs @@ -20,7 +20,7 @@ public class TokenRequestValidation_RefreshToken_Invalid private const string Category = "TokenRequest Validation - RefreshToken - Invalid"; private IClientStore _clients = Factory.CreateClientStore(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ResourceOwner_Invalid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ResourceOwner_Invalid.cs index 1c95d05e1..918fb9741 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ResourceOwner_Invalid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_ResourceOwner_Invalid.cs @@ -17,7 +17,7 @@ public class TokenRequestValidation_ResourceOwner_Invalid private const string Category = "TokenRequest Validation - ResourceOwner - Invalid"; private IClientStore _clients = Factory.CreateClientStore(); - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; [Fact] [Trait("Category", Category)] diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Valid.cs b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Valid.cs index a14d04b00..5fce427bb 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Valid.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/TokenRequest Validation/TokenRequestValidation_Valid.cs @@ -16,7 +16,7 @@ public class TokenRequestValidation_Valid { private const string Category = "TokenRequest Validation - General - Valid"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IClientStore _clients = Factory.CreateClientStore(); private TestDeviceCodeValidator _mockDeviceCodeValidator = new TestDeviceCodeValidator(); diff --git a/identity-server/test/IdentityServer.UnitTests/Validation/UserInfoRequestValidation.cs b/identity-server/test/IdentityServer.UnitTests/Validation/UserInfoRequestValidation.cs index 37edccb9e..a6856eb82 100644 --- a/identity-server/test/IdentityServer.UnitTests/Validation/UserInfoRequestValidation.cs +++ b/identity-server/test/IdentityServer.UnitTests/Validation/UserInfoRequestValidation.cs @@ -14,7 +14,7 @@ namespace UnitTests.Validation; public class UserInfoRequestValidation { private const string Category = "UserInfo Request Validation Tests"; - private readonly CT _ct = TestContext.Current.CancellationToken; + private readonly Ct _ct = TestContext.Current.CancellationToken; private IClientStore _clients = new InMemoryClientStore(TestClients.Get()); [Fact] diff --git a/shared/Global.cs b/shared/Global.cs index 488eb2b54..01f78651f 100644 --- a/shared/Global.cs +++ b/shared/Global.cs @@ -2,5 +2,5 @@ // See LICENSE in the project root for license information. #pragma warning disable IDE0005 // Remove unnecessary using directives -global using CT = System.Threading.CancellationToken; +global using Ct = System.Threading.CancellationToken; #pragma warning restore IDE0005