Facebook
From Queen Pintail, 2 Years ago, written in Python.
This paste is a reply to Re: Re: Re: Re: Re: Untitled from Mungo Crane - view diff
Embed
Download Paste or View Raw
Hits: 140
  1. @click.command()
  2. @click.argument('user', nargs=1)
  3. @click.argument('password', nargs=1)
  4. def login(user, password):
  5.     """
  6.    Allows user to login with his username and password.
  7.    """
  8.     auth_client = AuthClient()
  9.     login_data = LoginData(user, password)
  10.     access_token = auth_client.authenticate(login_data)
  11.  
  12.     auth_settings = AuthSettings(access_token=access_token)
  13.     AuthFileManager.set_auth(auth_settings) # Create .ai-exp
  14.  
  15.     auth_settings = AuthFileManager.get_auth()
  16.     access_token = auth_settings['access_token']
  17.  
  18.     if access_token:
  19.         aihub_logger.info("[INFO] User sucessfully logged in.")
  20.  
  21.     aihub_logger.debug(f"access_token: {access_token}")

Replies to Re: Re: Re: Re: Re: Re: Untitled rss

Title Name Language When
Re: Re: Re: Re: Re: Re: Re: Untitled Rude Porcupine python 2 Years ago.
captcha