Пример #1
0
 def get_authorize_url(self):
     if self.oauth_service:
         params = {
             "client_id": self.oauth_service.client_id,
             "redirect_uri": self.oauth_service.redirect_uri+"?service_id="+str(self.oauth_service.ID),
         }
         params.update(self.request_params)
         return set_get_url(self.oauth_service.auth_url, params)
     else:
         raise NoOAuthServiceErr("no found oauth service")
Пример #2
0
 def get_authorize_url(self):
     if self.oauth_service:
         params = {
             "appid": self.oauth_service.client_id,
             "scope": "snsapi_login",
             "redirect_uri":
             urllib.parse.quote(self.oauth_service.redirect_uri + "?service_id=" + str(self.oauth_service.ID)),
         }
         params.update(self.request_params)
         return set_get_url(self.oauth_service.auth_url, params)
     else:
         raise NoOAuthServiceErr("no found oauth service")