def extract_scopes(self, request):
payload = self.extract_payload(request)<EOL>if not payload:<EOL><INDENT>return None<EOL><DEDENT>scopes_attribute = self.config.scopes_name()<EOL>return payload.get(scopes_attribute, None)<EOL>
Extract scopes from a request object.