This commit is contained in:
parent
b5987004ed
commit
53e939cc3b
@ -100,7 +100,7 @@ class GetAuthTokenView(APIView):
|
|||||||
print("GET SECRET")
|
print("GET SECRET")
|
||||||
credential = "{0}:{1}".format(client_id, client_secret)
|
credential = "{0}:{1}".format(client_id, client_secret)
|
||||||
credential_b = base64.b64encode(credential.encode("utf-8"))
|
credential_b = base64.b64encode(credential.encode("utf-8"))
|
||||||
|
print(credential_b)
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"Basic {credential_b}",
|
"Authorization": f"Basic {credential_b}",
|
||||||
"Cache-Control": "no-cache",
|
"Cache-Control": "no-cache",
|
||||||
@ -109,7 +109,7 @@ class GetAuthTokenView(APIView):
|
|||||||
data = {
|
data = {
|
||||||
"grant_type": "client_credentials"
|
"grant_type": "client_credentials"
|
||||||
}
|
}
|
||||||
|
print(headers)
|
||||||
print("DATA READY")
|
print("DATA READY")
|
||||||
response = requests.post('http://izaac.izaac.pl/o/token/', headers=headers, data=data)
|
response = requests.post('http://izaac.izaac.pl/o/token/', headers=headers, data=data)
|
||||||
print(response.text)
|
print(response.text)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user