(self)
| 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 | |
| 65 | class OAuth1ClientLoginHandler(RequestHandler, OAuthMixin): |
nothing calls this directly
no test coverage detected