From c50e968171d48789587aa1a48e2a9e675c1ef7c2 Mon Sep 17 00:00:00 2001 From: Luciano Balmaceda Date: Thu, 2 May 2019 15:42:28 -0300 Subject: [PATCH] fix wrong HTTP method being used for rotating client secret --- auth0/v3/management/clients.py | 4 ++-- auth0/v3/test/management/test_clients.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/auth0/v3/management/clients.py b/auth0/v3/management/clients.py index a69dfa68..c0142179 100644 --- a/auth0/v3/management/clients.py +++ b/auth0/v3/management/clients.py @@ -129,7 +129,7 @@ def rotate_secret(self, id): See: https://auth0.com/docs/api/management/v2#!/Clients/post_rotate_secret """ - params = {'id': id } + data = {'id': id } url = self._url('%s/rotate-secret' % id) - return self.client.get(url, params=params) \ No newline at end of file + return self.client.post(url, data=data) \ No newline at end of file diff --git a/auth0/v3/test/management/test_clients.py b/auth0/v3/test/management/test_clients.py index ae9d5e55..4e4c10ee 100644 --- a/auth0/v3/test/management/test_clients.py +++ b/auth0/v3/test/management/test_clients.py @@ -119,8 +119,8 @@ def test_rotate_secret(self, mock_rc): c = Clients(domain='domain', token='jwttoken') c.rotate_secret('this-id') - mock_instance.get.assert_called_with( - 'https://domain/api/v2/clients/this-id/rotate-secret', params={'id': 'this-id'} + mock_instance.post.assert_called_with( + 'https://domain/api/v2/clients/this-id/rotate-secret', data={'id': 'this-id'} )