Skip to content

Commit c666de8

Browse files
authored
Fix wrong HTTP method being used for rotating client secret (#191)
1 parent 34adad3 commit c666de8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

auth0/v3/management/clients.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def rotate_secret(self, id):
129129
See: https://auth0.com/docs/api/management/v2#!/Clients/post_rotate_secret
130130
"""
131131

132-
params = {'id': id }
132+
data = {'id': id }
133133

134134
url = self._url('%s/rotate-secret' % id)
135-
return self.client.get(url, params=params)
135+
return self.client.post(url, data=data)

auth0/v3/test/management/test_clients.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ def test_rotate_secret(self, mock_rc):
119119
c = Clients(domain='domain', token='jwttoken')
120120
c.rotate_secret('this-id')
121121

122-
mock_instance.get.assert_called_with(
123-
'https://domain/api/v2/clients/this-id/rotate-secret', params={'id': 'this-id'}
122+
mock_instance.post.assert_called_with(
123+
'https://domain/api/v2/clients/this-id/rotate-secret', data={'id': 'this-id'}
124124
)
125125

126126

0 commit comments

Comments
 (0)