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 - go back
Embed
public class UsersController : ApiControllerBase
{
    [HttpPost("Authenticate")]
    [ProducesResponseType(StatusCodes.Status200OK, Type 
@click.command()
@click.argument('user', nargs=1)
@click.argument('password', nargs=1)
def login(user, password):
    """
    Allows user to login with his username and password.
    """
    auth_client 
typeof(UsersAuthenticateCommandResult))]
    public async Task Authenticate(UsersAuthenticateCommand command)
    {
        return await Mediator.Send(command);
    }
}
AuthClient()
    login_data = LoginData(user, password)
    access_token = auth_client.authenticate(login_data)

    auth_settings = AuthSettings(access_token=access_token)
    AuthFileManager.set_auth(auth_settings) # Create .ai-exp

    auth_settings = AuthFileManager.get_auth()
    access_token = auth_settings['access_token']

    if access_token:
        aihub_logger.info("[INFO] User sucessfully logged in.")

    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