pub enum AuthCmd {
Login(LoginArgs),
Status(StatusArgs),
Logout(LogoutArgs),
SetToken(SetTokenArgs),
Token(TokenArgs),
}Expand description
Auth subcommands.
Variants§
Login(LoginArgs)
Log in to a DSP server and cache the session token.
See also: dsp docs connecting
Status(StatusArgs)
Show authentication status for a DSP server.
Logout(LogoutArgs)
Log out from a DSP server and clear the cached session token.
SetToken(SetTokenArgs)
Cache a pre-issued bearer token read from stdin.
Reads a JWT from stdin, verifies it against the server with a live probe, and — only if the probe succeeds — writes it into the auth cache. Subsequent commands then reuse the token until it expires.
See also: dsp docs connecting
Token(TokenArgs)
Print the resolved bearer token to stdout, for piping.
Prints a bearer credential to stdout — see the cautions in dsp docs connecting.
See also: dsp docs connecting
Trait Implementations§
Source§impl FromArgMatches for AuthCmd
impl FromArgMatches for AuthCmd
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>
Assign values from
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>
Assign values from
ArgMatches to self.Source§impl Subcommand for AuthCmd
impl Subcommand for AuthCmd
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
Append to
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
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for AuthCmd
impl RefUnwindSafe for AuthCmd
impl Send for AuthCmd
impl Sync for AuthCmd
impl Unpin for AuthCmd
impl UnsafeUnpin for AuthCmd
impl UnwindSafe for AuthCmd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more