当前位置: 首页>>代码示例>>Python>>正文


Python Request.authorized_scopes方法代码示例

本文整理汇总了Python中oauthlib.common.Request.authorized_scopes方法的典型用法代码示例。如果您正苦于以下问题:Python Request.authorized_scopes方法的具体用法?Python Request.authorized_scopes怎么用?Python Request.authorized_scopes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oauthlib.common.Request的用法示例。


在下文中一共展示了Request.authorized_scopes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_authorization_response

# 需要导入模块: from oauthlib.common import Request [as 别名]
# 或者: from oauthlib.common.Request import authorized_scopes [as 别名]
 def create_authorization_response(self, uri, http_method='GET', body=None,
         headers=None, scopes=None, credentials=None):
     """Extract response_type and route to the designated handler."""
     request = Request(uri, http_method=http_method, body=body, headers=headers)
     request.authorized_scopes = scopes
     for k, v in (credentials or {}).items():
         setattr(request, k, v)
     response_type_handler = self.response_types.get(
             request.response_type, self.default_response_type_handler)
     return response_type_handler.create_authorization_response(
                     request, self.default_token)
开发者ID:Acidburn0zzz,项目名称:firefox-flicks,代码行数:13,代码来源:__init__.py

示例2: create_authorization_response

# 需要导入模块: from oauthlib.common import Request [as 别名]
# 或者: from oauthlib.common.Request import authorized_scopes [as 别名]
 def create_authorization_response(self, uri, http_method='GET', body=None,
         headers=None, scopes=None, credentials=None):
     """Extract response_type and route to the designated handler."""
     request = Request(uri, http_method=http_method, body=body, headers=headers)
     request.authorized_scopes = scopes  # TODO: implement/test/doc this
     # TODO: decide whether this should be a required argument
     request.user = None     # TODO: explain this in docs
     for k, v in (credentials or {}).items():
         setattr(request, k, v)
     response_type_handler = self.response_types.get(
             request.response_type, self.default_response_type_handler)
     log.debug('Dispatching response_type %s request to %r.',
               request.response_type, response_type_handler)
     return response_type_handler.create_authorization_response(
                     request, self.default_token_type)
开发者ID:seatme,项目名称:oauthlib,代码行数:17,代码来源:__init__.py


注:本文中的oauthlib.common.Request.authorized_scopes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。