Пример #1
0
    def test_create_code_challenge_plain(self):
        client = Client(self.client_id)
        code_verifier = client.create_code_verifier(length=128)
        code_challenge_plain = client.create_code_challenge(code_verifier=code_verifier)

        # if no code_challenge_method specified, code_challenge = code_verifier
        self.assertEqual(code_challenge_plain, client.code_verifier)
        self.assertEqual(client.code_challenge_method, "plain")
Пример #2
0
 def test_create_code_challenge_s256(self):
     client = Client(self.client_id)
     code_verifier = client.create_code_verifier(length=128)
     code_challenge_s256 = client.create_code_challenge(code_verifier=code_verifier, code_challenge_method='S256')
     self.assertEqual(code_challenge_s256, client.code_challenge)