Implemented auth widget object and auth data validator.

This commit is contained in:
Alex Root Junior 2018-02-22 01:56:44 +02:00
parent 6ee38bcad9
commit 4f2cb40aea
4 changed files with 75 additions and 0 deletions

View file

@ -7,6 +7,7 @@ import aiohttp
from . import api
from ..types import ParseMode, base
from ..utils import json
from ..utils.auth_widget import check_token
class BaseBot:
@ -248,3 +249,6 @@ class BaseBot:
@parse_mode.deleter
def parse_mode(self):
self.parse_mode = None
def check_auth_widget(self, data):
return check_token(data, self.__token)