pub enum AuthCommands {
Oauth2 {
no_browser: bool,
step: Option<u8>,
auth_url: Option<String>,
username: Option<String>,
},
Oauth1 {
consumer_key: String,
consumer_secret: String,
access_token: String,
token_secret: String,
},
App {
bearer_token: String,
},
Status,
Clear {
all: bool,
oauth1: bool,
oauth2_username: Option<String>,
bearer: bool,
force: bool,
},
Apps {
command: AppCommands,
},
Default {
app_name: Option<String>,
username: Option<String>,
},
}Expand description
Auth subcommands.
Variants§
Oauth2
Configure OAuth2 authentication
Fields
no_browser: boolEnable manual two-step flow for headless machines (SSH, containers)
Auto-engages when stdout is not a TTY (piped runs, CI) so headless
callers receive the auth URL instead of a silent open::that spawn
that nothing will see. The XURL_NO_BROWSER env var sets this by
default on machines that should never attempt to open a browser.
Honours 1 / true / yes / on as truthy and 0 / false /
no / off / empty as falsey (the same FalseyValueParser shape
used by every other env-backed boolean flag).
Oauth1
Configure OAuth1 authentication
Fields
App
Configure app-auth (bearer token)
Status
Show authentication status
Clear
Clear authentication tokens
Fields
Apps
Manage registered X API apps
Fields
command: AppCommandsapps subcommand to dispatch (add, list, update, …).
Default
Set default app and/or user
Trait Implementations§
Source§impl Debug for AuthCommands
impl Debug for AuthCommands
Source§impl FromArgMatches for AuthCommands
impl FromArgMatches for AuthCommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for AuthCommands
impl Subcommand for AuthCommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand