Skip to content

Commit

Permalink
fix wrong HTTP method being used for rotating client secret
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed May 2, 2019
1 parent 34adad3 commit 439e521
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions auth0/v3/management/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
return self.client.post(url, data=data)
4 changes: 2 additions & 2 deletions auth0/v3/test/management/test_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
)


Expand Down

0 comments on commit 439e521

Please sign in to comment.