cpop.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:fedoidc 作者: OpenIDC 项目源码 文件源码
def token(self, **kwargs):
        if cherrypy.request.method == "OPTIONS":
            cherrypy_cors.preflight(
                allowed_methods=["POST"], origins='*',
                allowed_headers=['Authorization', 'content-type'])
        else:
            logger.debug('AccessTokenRequest')
            try:
                authn = cherrypy.request.headers['Authorization']
            except KeyError:
                authn = None
            logger.debug('Authorization: {}'.format(authn))
            try:
                resp = self.op.token_endpoint(kwargs, authn, 'dict')
            except Exception as err:
                raise cherrypy.HTTPError(message=str(err))
            else:
                return conv_response(resp)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号