Add 42Oauth #37
|
@ -54,7 +54,10 @@ def authorize_intra42(request):
|
|||
response = oauth_intra42.intra42.get('v2/me', token=token)
|
||||
response = response.json()
|
||||
intra42_id = response['id']
|
||||
intra42_campus = response['campus'][0]['name']
|
||||
print(intra42_campus)
|
||||
request.user.userprofileinfo.intra42_id = intra42_id
|
||||
request.user.userprofileinfo.intra42_campus = intra42_campus
|
||||
request.user.userprofileinfo.save()
|
||||
return redirect('accounts:edit')
|
||||
|
||||
|
|
Loading…
Reference in New Issue