INNER CODE UNIT · Python

test_wrong_redirect_is_rejected

Kounex/obs_blade · tool/kick_auth_proxy/test_proxy.py:35

    def test_wrong_redirect_is_rejected(self):
        with self.assertRaises(proxy.ProxyError) as caught:
            proxy.build_upstream(
                {
                    "grant_type": "authorization_code",
                    "code": "code-1",
                    "code_verifier": "verifier-1",
                    "redirect_uri": "https://evil.example/callback",
                }
            )
        self.assertEqual(caught.exception.status, 400)

    def test_refresh_drops_anything_except_the_refresh_token(self):
        form = proxy.build_upstream(
            {
                "grant_type": "refresh_token",
                "refresh_token": "refresh-1",
                "client_secret": "nope",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…