mirror of https://github.com/abpframework/abp.git
8 changed files with 125 additions and 14 deletions
@ -0,0 +1,18 @@ |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.Cli.Auth |
|||
{ |
|||
public class AuthService : ITransientDependency |
|||
{ |
|||
public async Task LoginAsync(string userName, string password) |
|||
{ |
|||
|
|||
} |
|||
|
|||
public async Task LogoutAsync() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.Cli |
|||
{ |
|||
public class CliOptions |
|||
{ |
|||
public Dictionary<string, Type> Commands { get; } |
|||
|
|||
public CliOptions() |
|||
{ |
|||
Commands = new Dictionary<string, Type>(StringComparer.OrdinalIgnoreCase); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Logging; |
|||
using Microsoft.Extensions.Logging.Abstractions; |
|||
using Volo.Abp.Cli.Args; |
|||
using Volo.Abp.Cli.Auth; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.Cli.Commands |
|||
{ |
|||
public class LoginCommand : IConsoleCommand, ITransientDependency |
|||
{ |
|||
public ILogger<LoginCommand> Logger { get; set; } |
|||
|
|||
protected AuthService AuthService { get; } |
|||
|
|||
public LoginCommand(AuthService authService) |
|||
{ |
|||
AuthService = authService; |
|||
Logger = NullLogger<LoginCommand>.Instance; |
|||
} |
|||
|
|||
public async Task ExecuteAsync(CommandLineArgs commandLineArgs) |
|||
{ |
|||
if (commandLineArgs.Target.IsNullOrEmpty()) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.Extensions.Logging; |
|||
using Microsoft.Extensions.Logging.Abstractions; |
|||
using Volo.Abp.Cli.Args; |
|||
using Volo.Abp.Cli.Auth; |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.Cli.Commands |
|||
{ |
|||
public class LogoutCommand : IConsoleCommand, ITransientDependency |
|||
{ |
|||
public ILogger<LogoutCommand> Logger { get; set; } |
|||
|
|||
protected AuthService AuthService { get; } |
|||
|
|||
public LogoutCommand(AuthService authService) |
|||
{ |
|||
AuthService = authService; |
|||
Logger = NullLogger<LogoutCommand>.Instance; |
|||
} |
|||
|
|||
public Task ExecuteAsync(CommandLineArgs commandLineArgs) |
|||
{ |
|||
return AuthService.LogoutAsync(); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue