This commit is contained in:
parent
d6e7cf2ca9
commit
db4522a572
|
|
@ -84,22 +84,13 @@ from django.views.generic import TemplateView
|
||||||
|
|
||||||
# Entry-Point for NC
|
# Entry-Point for NC
|
||||||
def ncLogin(request, uid):
|
def ncLogin(request, uid):
|
||||||
#logout(request)
|
logout(request)
|
||||||
#print(uid)
|
print(uid)
|
||||||
user = User.objects.get(username=uid)
|
user = User.objects.get(username=uid)
|
||||||
#if(getNCLoggedUserBySession(user.profile.nc_sid) == uid):
|
if(getNCLoggedUserBySession(user.profile.nc_sid) == uid):
|
||||||
# login(request, user)
|
login(request, user)
|
||||||
# return redirect('users-dashboard')
|
return redirect('users-dashboard')
|
||||||
#return redirect('nclog', uid=uid)
|
return render(request, 'users/nclog.html',{'error' : "Bereite daten vor...bitte die Seite neu laden!"})
|
||||||
nc_login_headers = {'Authorization' : 'Bearer ' + "ioqv9r9g0dc6fh5e787vb2g8fo"}
|
|
||||||
r = requests.get("https://cloud.digitale-agentur.com/ocs/v2.php/apps/user_status/api/v1/user_status", headers=nc_login_headers, verify=False)
|
|
||||||
print(r.text)
|
|
||||||
#xpars = xmltodict.parse(r.text)
|
|
||||||
#js = json.dumps(xpars)
|
|
||||||
|
|
||||||
#final_json = json.loads(js)
|
|
||||||
#return final_json['ocs']['data']['userId']
|
|
||||||
return render(request, 'users/nclog.html',{'error' : "Bereite daten vor..." + str(r.text)})
|
|
||||||
|
|
||||||
def getICSFile(request, ag):
|
def getICSFile(request, ag):
|
||||||
if 'HTTP_AUTHORIZATION' in request.META:
|
if 'HTTP_AUTHORIZATION' in request.META:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue