title: Click Command Line Interfaces: Make options required if other optional option is unset
body: <p>When writing a command-line interface (CLI) with the Python <a href="http://click.pocoo.org/6/" rel="noreferrer">click library</a>, is it possible to define e.g. three options where the second and third one are only required if the first (optional) one was left unset?</p>
  
  <p>My use case is a log-in system which allows me to authenticate either via an <code>authentication token</code> (option 1), or, alternatively, via <code>username</code> (option 2) and <code>password</code> (option 3). </p>
  
  <p>If the token was given, there is no need to check for <code>username</code> and <code>password</code> being defined or prompting them. Otherwise, if the token was omitted then <code>username</code> and <code>password</code> become required and must be given.</p>
  
  <p>Can this be done somehow using callbacks?</p>
  
  <p>My code to get started which of course does not reflect the intended pattern:</p>
  
  <pre><code>@click.command()
  @click.option('--authentication-token', prompt=True, required=True)
  @click.option('--username', prompt=True, required=True)
  @click.option('--password', hide_input=True, prompt=True, required=True)
  def login(authentication_token, username, password):
      print(authentication_token, username, password)
  
  if __name__ == '__main__':
      login()
  </code></pre>