Browse Source

Cli: Create IAuthService

pull/10951/head
Yunus Emre Kalkan 5 years ago
parent
commit
de964d9f77
  1. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs
  2. 12
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/IAuthService.cs
  3. 1
      studio/src/Volo.Abp.Studio.Domain.Shared/Volo/Abp/Studio/AbpStudioErrorCodes.cs

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/AuthService.cs

@ -17,7 +17,7 @@ using Volo.Abp.Threading;
namespace Volo.Abp.Cli.Auth; namespace Volo.Abp.Cli.Auth;
public class AuthService : ITransientDependency public class AuthService : IAuthService, ITransientDependency
{ {
protected IIdentityModelAuthenticationService AuthenticationService { get; } protected IIdentityModelAuthenticationService AuthenticationService { get; }
protected ILogger<AuthService> Logger { get; } protected ILogger<AuthService> Logger { get; }

12
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Auth/IAuthService.cs

@ -0,0 +1,12 @@
using System.Threading.Tasks;
namespace Volo.Abp.Cli.Auth;
public interface IAuthService
{
Task<LoginInfo> GetLoginInfoAsync();
Task LoginAsync(string userName, string password, string organizationName = null);
Task LogoutAsync();
}

1
studio/src/Volo.Abp.Studio.Domain.Shared/Volo/Abp/Studio/AbpStudioErrorCodes.cs

@ -21,6 +21,7 @@ public static class AbpStudioErrorCodes
public const string PackageNotSpecified = "AbpStudio:PackageNotSpecified"; public const string PackageNotSpecified = "AbpStudio:PackageNotSpecified";
public const string DbmsMustBeSpecified = "AbpStudio:DbmsMustBeSpecified"; public const string DbmsMustBeSpecified = "AbpStudio:DbmsMustBeSpecified";
public const string UserNotLoggedIn = "AbpStudio:UserNotLoggedIn"; public const string UserNotLoggedIn = "AbpStudio:UserNotLoggedIn";
public const string LoginFailed = "AbpStudio:LoginFailed";
public const string PackageAlreadyExist = "AbpStudio:PackageAlreadyExist"; public const string PackageAlreadyExist = "AbpStudio:PackageAlreadyExist";
public const string AbpModuleFileNotFound = "AbpStudio:AbpModuleFileNotFound"; public const string AbpModuleFileNotFound = "AbpStudio:AbpModuleFileNotFound";
public const string DllNotFound = "AbpStudio:DllNotFound"; public const string DllNotFound = "AbpStudio:DllNotFound";

Loading…
Cancel
Save