This commit is contained in:
parent
aca78e69ba
commit
c7b8c0f766
@ -94,15 +94,14 @@ class GetAuthTokenView(APIView):
|
|||||||
authentication_classes = []
|
authentication_classes = []
|
||||||
permission_classes = []
|
permission_classes = []
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
print("GET ID")
|
# print("GET ID")
|
||||||
client_id = settings.REACT_CLIENT_ID
|
# client_id = settings.REACT_CLIENT_ID
|
||||||
client_secret = settings.REACT_CLIENT_SECRET
|
# client_secret = settings.REACT_CLIENT_SECRET
|
||||||
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")).decode("utf-8")
|
# credential_b = base64.b64encode(credential.encode("utf-8")).decode("utf-8")
|
||||||
print(credential_b)
|
# print(credential_b)
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": f"Basic {credential_b}",
|
|
||||||
"Cache-Control": "no-cache",
|
"Cache-Control": "no-cache",
|
||||||
"Content-Type": "application/x-www-form-urlencoded"
|
"Content-Type": "application/x-www-form-urlencoded"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user