files tree made better.
This commit is contained in:
parent
ffbf032480
commit
ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions
31
src/cli/Commands/AuthCommander.cs
Normal file
31
src/cli/Commands/AuthCommander.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
using cli.Model;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
|
||||
namespace cli.Commands
|
||||
{
|
||||
public class AuthCommander : ICommander
|
||||
{
|
||||
public CommandLineApplication Integrate(CommandLineApplication rootApp)
|
||||
{
|
||||
|
||||
CommandLineApplication authApp = rootApp.Command("auth",
|
||||
(target) =>
|
||||
{
|
||||
target.FullName = "Authentication methods";
|
||||
target.Description = "Login, save credentials and get authorized.";
|
||||
target.HelpOption("-? | -h | --help");
|
||||
var loginCommand = target.Command("login", app => {
|
||||
var loginarg = app.Argument("login", "login to use", true);
|
||||
app.Option( "-s | --save", "Save authentication token to file", CommandOptionType.NoValue);
|
||||
app.HelpOption("-? | -h | --help");
|
||||
} );
|
||||
}, false);
|
||||
authApp.OnExecute(()=>
|
||||
{
|
||||
return 0;
|
||||
});
|
||||
return authApp;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue