diff --git a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs index 75b4bb4aec..84ade2837d 100644 --- a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs +++ b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs @@ -309,7 +309,6 @@ namespace Umbraco.Cms.Core.DependencyInjection factory.GetRequiredService(), factory.GetRequiredService() )); - Services.AddUnique(factory => factory.GetRequiredService()); Services.AddUnique(factory => factory.GetRequiredService()); Services.AddUnique(factory => new LocalizedTextService( factory.GetRequiredService>(), diff --git a/src/Umbraco.Core/Services/ExternalLoginService.cs b/src/Umbraco.Core/Services/ExternalLoginService.cs index d934e89528..c290f3cd59 100644 --- a/src/Umbraco.Core/Services/ExternalLoginService.cs +++ b/src/Umbraco.Core/Services/ExternalLoginService.cs @@ -13,7 +13,7 @@ using Umbraco.Extensions; namespace Umbraco.Cms.Core.Services { - public class ExternalLoginService : RepositoryService, IExternalLoginService, IExternalLoginWithKeyService + public class ExternalLoginService : RepositoryService, IExternalLoginWithKeyService { private readonly IExternalLoginWithKeyRepository _externalLoginRepository; diff --git a/src/Umbraco.Core/Services/IExternalLoginService.cs b/src/Umbraco.Core/Services/IExternalLoginService.cs deleted file mode 100644 index 75f8069f0c..0000000000 --- a/src/Umbraco.Core/Services/IExternalLoginService.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using Umbraco.Cms.Core.Security; - -namespace Umbraco.Cms.Core.Services -{ - /// - /// Used to store the external login info - /// - [Obsolete("Use IExternalLoginServiceWithKey. This will be removed in Umbraco 10")] - public interface IExternalLoginService : IService - { - /// - /// Returns all user logins assigned - /// - /// - /// - IEnumerable GetExternalLogins(int userId); - - /// - /// Returns all user login tokens assigned - /// - /// - /// - IEnumerable GetExternalLoginTokens(int userId); - - /// - /// Returns all logins matching the login info - generally there should only be one but in some cases - /// there might be more than one depending on if an administrator has been editing/removing members - /// - /// - /// - /// - IEnumerable Find(string loginProvider, string providerKey); - - /// - /// Saves the external logins associated with the user - /// - /// - /// The user associated with the logins - /// - /// - /// - /// This will replace all external login provider information for the user - /// - void Save(int userId, IEnumerable logins); - - /// - /// Saves the external login tokens associated with the user - /// - /// - /// The user associated with the tokens - /// - /// - /// - /// This will replace all external login tokens for the user - /// - void Save(int userId, IEnumerable tokens); - - /// - /// Deletes all user logins - normally used when a member is deleted - /// - /// - void DeleteUserLogins(int userId); - } -} diff --git a/src/Umbraco.Core/Services/ServiceContext.cs b/src/Umbraco.Core/Services/ServiceContext.cs index 20774bd7a2..ea419f99f8 100644 --- a/src/Umbraco.Core/Services/ServiceContext.cs +++ b/src/Umbraco.Core/Services/ServiceContext.cs @@ -29,7 +29,7 @@ namespace Umbraco.Cms.Core.Services private readonly Lazy? _memberTypeService; private readonly Lazy? _memberGroupService; private readonly Lazy? _notificationService; - private readonly Lazy? _externalLoginService; + private readonly Lazy? _externalLoginService; private readonly Lazy? _redirectUrlService; private readonly Lazy? _consentService; private readonly Lazy? _keyValueService; @@ -38,7 +38,7 @@ namespace Umbraco.Cms.Core.Services /// /// Initializes a new instance of the class with lazy services. /// - public ServiceContext(Lazy? publicAccessService, Lazy? domainService, Lazy? auditService, Lazy? localizedTextService, Lazy? tagService, Lazy? contentService, Lazy? userService, Lazy? memberService, Lazy? mediaService, Lazy? contentTypeService, Lazy? mediaTypeService, Lazy? dataTypeService, Lazy? fileService, Lazy? localizationService, Lazy? packagingService, Lazy? serverRegistrationService, Lazy? entityService, Lazy? relationService, Lazy? macroService, Lazy? memberTypeService, Lazy? memberGroupService, Lazy? notificationService, Lazy? externalLoginService, Lazy? redirectUrlService, Lazy? consentService, Lazy? keyValueService, Lazy? contentTypeBaseServiceProvider) + public ServiceContext(Lazy? publicAccessService, Lazy? domainService, Lazy? auditService, Lazy? localizedTextService, Lazy? tagService, Lazy? contentService, Lazy? userService, Lazy? memberService, Lazy? mediaService, Lazy? contentTypeService, Lazy? mediaTypeService, Lazy? dataTypeService, Lazy? fileService, Lazy? localizationService, Lazy? packagingService, Lazy? serverRegistrationService, Lazy? entityService, Lazy? relationService, Lazy? macroService, Lazy? memberTypeService, Lazy? memberGroupService, Lazy? notificationService, Lazy? externalLoginService, Lazy? redirectUrlService, Lazy? consentService, Lazy? keyValueService, Lazy? contentTypeBaseServiceProvider) { _publicAccessService = publicAccessService; _domainService = domainService; @@ -97,7 +97,7 @@ namespace Umbraco.Cms.Core.Services IDomainService? domainService = null, IMacroService? macroService = null, IPublicAccessService? publicAccessService = null, - IExternalLoginService? externalLoginService = null, + IExternalLoginWithKeyService? externalLoginService = null, IServerRegistrationService? serverRegistrationService = null, IRedirectUrlService? redirectUrlService = null, IConsentService? consentService = null, @@ -250,7 +250,7 @@ namespace Umbraco.Cms.Core.Services /// /// Gets the ExternalLoginService. /// - public IExternalLoginService? ExternalLoginService => _externalLoginService?.Value; + public IExternalLoginWithKeyService? ExternalLoginService => _externalLoginService?.Value; /// /// Gets the RedirectUrlService. diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs b/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs index c91dda8890..284114dcd4 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs @@ -89,30 +89,6 @@ namespace Umbraco.Cms.Core.Security } - [Obsolete("Use non obsolete ctor")] - public BackOfficeUserStore( - ICoreScopeProvider scopeProvider, - IUserService userService, - IEntityService entityService, - IExternalLoginService externalLoginService, - IOptions globalSettings, - IUmbracoMapper mapper, - BackOfficeErrorDescriber describer, - AppCaches appCaches) - : this( - scopeProvider, - userService, - entityService, - StaticServiceProvider.Instance.GetRequiredService(), - StaticServiceProvider.Instance.GetRequiredService>(), - mapper, - describer, - appCaches, - StaticServiceProvider.Instance.GetRequiredService()) - { - - } - /// public override async Task GetTwoFactorEnabledAsync(BackOfficeIdentityUser user, CancellationToken cancellationToken = default(CancellationToken)) diff --git a/src/Umbraco.Infrastructure/Security/MemberUserStore.cs b/src/Umbraco.Infrastructure/Security/MemberUserStore.cs index 87eb5f363e..7812075f8d 100644 --- a/src/Umbraco.Infrastructure/Security/MemberUserStore.cs +++ b/src/Umbraco.Infrastructure/Security/MemberUserStore.cs @@ -68,7 +68,7 @@ namespace Umbraco.Cms.Core.Security ICoreScopeProvider scopeProvider, IdentityErrorDescriber describer, IPublishedSnapshotAccessor publishedSnapshotAccessor, - IExternalLoginService externalLoginService) + IExternalLoginWithKeyService externalLoginService) : this(memberService, mapper, scopeProvider, describer, publishedSnapshotAccessor, StaticServiceProvider.Instance.GetRequiredService(), StaticServiceProvider.Instance.GetRequiredService()) {