def _func(self, conv):
try:
request = registration_request(conv)
except NoSuchEvent:
self._status = ERROR
else:
# 'offline_access only allow if response_type == 'code'
try:
req_scope = request['scope']
except KeyError:
pass
else:
if 'offline_access' in req_scope:
if request['response_type'] != 'code':
self._status = ERROR
self._message = 'Offline access not allowed for ' \
'anything but code flow'
return {}
评论列表
文章目录