using Microsoft.AspNetCore.Mvc; using Nop.Core.Domain.Customers; namespace Nop.Services.Authentication.External; /// /// External authentication service /// public partial interface IExternalAuthenticationService { /// /// Authenticate user by passed parameters /// /// External authentication parameters /// URL to which the user will return after authentication /// /// A task that represents the asynchronous operation /// The task result contains the result of an authentication /// Task AuthenticateAsync(ExternalAuthenticationParameters parameters, string returnUrl = null); /// /// Get the external authentication records by identifier /// /// External authentication record identifier /// /// A task that represents the asynchronous operation /// The task result contains the result /// Task GetExternalAuthenticationRecordByIdAsync(int externalAuthenticationRecordId); /// /// Get all the external authentication records by customer /// /// Customer /// /// A task that represents the asynchronous operation /// The task result contains the customer /// Task> GetCustomerExternalAuthenticationRecordsAsync(Customer customer); /// /// Delete the external authentication record /// /// External authentication record /// A task that represents the asynchronous operation Task DeleteExternalAuthenticationRecordAsync(ExternalAuthenticationRecord externalAuthenticationRecord); /// /// Get the external authentication record /// /// External authentication parameters /// /// A task that represents the asynchronous operation /// The task result contains the result /// Task GetExternalAuthenticationRecordByExternalAuthenticationParametersAsync(ExternalAuthenticationParameters parameters); /// /// Associate external account with customer /// /// Customer /// External authentication parameters /// A task that represents the asynchronous operation Task AssociateExternalAccountWithUserAsync(Customer customer, ExternalAuthenticationParameters parameters); /// /// Get the particular user with specified parameters /// /// External authentication parameters /// /// A task that represents the asynchronous operation /// The task result contains the customer /// Task GetUserByExternalAuthenticationParametersAsync(ExternalAuthenticationParameters parameters); /// /// Remove the association /// /// External authentication parameters /// A task that represents the asynchronous operation Task RemoveAssociationAsync(ExternalAuthenticationParameters parameters); }