Skip to content

Commit ff72cce

Browse files
committed
remove explicit headers arg. defaults already set it
1 parent b0a5a91 commit ff72cce

File tree

7 files changed

+15
-31
lines changed

7 files changed

+15
-31
lines changed

auth0/v3/authentication/database.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ def login(self, client_id, username, password, connection, id_token=None,
3232
'device': device,
3333
'grant_type': grant_type,
3434
'scope': scope,
35-
},
36-
headers={'Content-Type': 'application/json'}
35+
}
3736
)
3837

3938
def signup(self, client_id, email, password, connection, username=None,
@@ -67,8 +66,7 @@ def signup(self, client_id, email, password, connection, username=None,
6766

6867
return self.post(
6968
'https://{}/dbconnections/signup'.format(self.domain),
70-
data=body,
71-
headers={'Content-Type': 'application/json'}
69+
data=body
7270
)
7371

7472
def change_password(self, client_id, email, connection, password=None):
@@ -82,6 +80,5 @@ def change_password(self, client_id, email, connection, password=None):
8280
'email': email,
8381
'password': password,
8482
'connection': connection,
85-
},
86-
headers={'Content-Type': 'application/json'}
83+
}
8784
)

auth0/v3/authentication/delegated.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@ def get_token(self, client_id, target, api_type, grant_type,
3737

3838
return self.post(
3939
'https://{}/delegation'.format(self.domain),
40-
headers={'Content-Type': 'application/json'},
4140
data=data
4241
)

auth0/v3/authentication/get_token.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ def authorization_code(self, client_id, client_secret, code,
4242
'code': code,
4343
'grant_type': grant_type,
4444
'redirect_uri': redirect_uri,
45-
},
46-
headers={'Content-Type': 'application/json'}
45+
}
4746
)
4847

4948
def authorization_code_pkce(self, client_id, code_verifier, code,
@@ -79,8 +78,7 @@ def authorization_code_pkce(self, client_id, code_verifier, code,
7978
'code': code,
8079
'grant_type': grant_type,
8180
'redirect_uri': redirect_uri,
82-
},
83-
headers={'Content-Type': 'application/json'}
81+
}
8482
)
8583

8684
def client_credentials(self, client_id, client_secret, audience,
@@ -113,8 +111,7 @@ def client_credentials(self, client_id, client_secret, audience,
113111
'client_secret': client_secret,
114112
'audience': audience,
115113
'grant_type': grant_type,
116-
},
117-
headers={'Content-Type': 'application/json'}
114+
}
118115
)
119116

120117
def login(self, client_id, client_secret, username, password, scope, realm,
@@ -164,8 +161,7 @@ def login(self, client_id, client_secret, username, password, scope, realm,
164161
'scope': scope,
165162
'audience': audience,
166163
'grant_type': grant_type
167-
},
168-
headers={'Content-Type': 'application/json'}
164+
}
169165
)
170166

171167
def refresh_token(self, client_id, client_secret, refresh_token, grant_type='refresh_token'):
@@ -194,6 +190,5 @@ def refresh_token(self, client_id, client_secret, refresh_token, grant_type='ref
194190
'client_secret': client_secret,
195191
'refresh_token': refresh_token,
196192
'grant_type': grant_type
197-
},
198-
headers={'Content-Type': 'application/json'}
193+
}
199194
)

auth0/v3/authentication/logout.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ def logout(self, client_id, return_to, federated=False):
3232
if federated is True:
3333
return self.get(
3434
'https://{}/v2/logout?federated&client_id={}&returnTo={}'.format(
35-
self.domain, client_id, return_to),
36-
headers={'Content-Type': 'application/json'}
35+
self.domain, client_id, return_to)
3736
)
3837
return self.get(
3938
'https://{}/v2/logout?client_id={}&returnTo={}'.format(self.domain,
4039
client_id,
41-
return_to),
42-
headers={'Content-Type': 'application/json'}
40+
return_to)
4341
)

auth0/v3/authentication/passwordless.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ def email(self, client_id, email, send='link', auth_params=None):
4141
'email': email,
4242
'send': send,
4343
'authParams': auth_params
44-
},
45-
headers={'Content-Type': 'application/json'}
44+
}
4645
)
4746

4847
def sms(self, client_id, phone_number):
@@ -55,8 +54,7 @@ def sms(self, client_id, phone_number):
5554
'client_id': client_id,
5655
'connection': 'sms',
5756
'phone_number': phone_number,
58-
},
59-
headers={'Content-Type': 'application/json'}
57+
}
6058
)
6159

6260
def sms_login(self, client_id, phone_number, code, scope='openid'):
@@ -72,6 +70,5 @@ def sms_login(self, client_id, phone_number, code, scope='openid'):
7270
'username': phone_number,
7371
'password': code,
7472
'scope': scope,
75-
},
76-
headers={'Content-Type': 'application/json'}
73+
}
7774
)

auth0/v3/authentication/social.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,5 @@ def login(self, client_id, access_token, connection, scope='openid'):
3535
'access_token': access_token,
3636
'connection': connection,
3737
'scope': scope,
38-
},
39-
headers={'Content-Type': 'application/json'}
38+
}
4039
)

auth0/v3/authentication/users.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ def tokeninfo(self, jwt):
4444
warnings.warn("/tokeninfo will be deprecated in future releases", DeprecationWarning)
4545
return self.post(
4646
url='https://{}/tokeninfo'.format(self.domain),
47-
data={'id_token': jwt},
48-
headers={'Content-Type': 'application/json'}
47+
data={'id_token': jwt}
4948
)

0 commit comments

Comments
 (0)