from strongr.core.domain.authdomain import AuthDomain
from .wrapper import Command

import json

class IsValidUserCommand(Command):
    """
    Check if the login is a valid user

    authdomain:isvaliduser
        {username : The username to be checked}
        {password : The <PASSWORD> be <PASSWORD>}
    """
    def handle(self):
        authService = AuthDomain.authService()
        queryFactory = AuthDomain.queryFactory()

        query = queryFactory.newIsValidUserQuery(self.argument('username'), self.argument('password'))
        result = authService.getQueryBus().handle(query)
        print(json.dumps(result))

from strongr.core.domain.authdomain import AuthDomain
from .wrapper import Command

import json

class IsValidUserCommand(Command):
    """
    Check if the login is a valid user

    authdomain:isvaliduser
        {username : The username to be checked}
        {password : The <PASSWORD> be <PASSWORD>}
    """
    def handle(self):
        authService = AuthDomain.authService()
        queryFactory = AuthDomain.queryFactory()

        query = queryFactory.newIsValidUserQuery(self.argument('username'), self.argument('password'))
        result = authService.getQueryBus().handle(query)
        print(json.dumps(result))

Check if the login is a valid user      authdomain:isvaliduser         {username : The username to be checked}         {password : The <PASSWORD> be <PASSWORD>}