12345678910111213141516171819202122232425 |
- # -*- coding: utf-8 -*-
- # !/usr/bin/env python
- from typing import Optional, TYPE_CHECKING
- from apps.web.core import BaseAppProxy
- if TYPE_CHECKING:
- from apps.web.core.models import EmbeddedApp, WechatPayApp
- class AuthBridge(BaseAppProxy):
- def __init__(self, app):
- # type: (Optional[EmbeddedApp, WechatPayApp])->None
- super(AuthBridge, self).__init__(app)
- def __repr__(self):
- return '<{}(appid={}, occupant={})>'.format(self.__class__.__name__, self.app.appid, self.occupantId)
- def authorize(self, auth_code):
- raise NotImplementedError('must implement authorize method')
- def get_user_info(self, auth_code):
- raise NotImplementedError('must implement get_user_info method')
|