MCPcopy
hub / github.com/tornadoweb/tornado / post

Method post

tornado/test/auth_test.py:51–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 flip_flop = False
50
51 def post(self):
52 if self.get_argument("openid.mode") != "check_authentication":
53 raise Exception("incorrect openid.mode %r")
54 # Cover both orderings of the response parameters if we call this handler twice.
55 # (the flip_flop side effect is simpler than plumbing parameters around).
56 # We check both orderings to catch mistaken uses of re.match instead of re.search
57 # or incorrect matching of the newline characters.
58 if type(self).flip_flop:
59 self.write("is_valid:true\nns:http://specs.openid.net/auth/2.0\n")
60 else:
61 self.write("ns:http://specs.openid.net/auth/2.0\nis_valid:true\n")
62 type(self).flip_flop = not type(self).flip_flop
63
64
65class OAuth1ClientLoginHandler(RequestHandler, OAuthMixin):

Callers

nothing calls this directly

Calls 2

get_argumentMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected