@classmethod
def get_login(cls, key, command, path):
    """Validate the key for the command and path
        Return the user id if succeed or None
        """
    shares = cls.search([('key', '=', key)])
    if not shares:
        return None
    for share in shares:
        if cls.match(share, command, path):
            return share.user.id
    return None
