oauth raus
This commit is contained in:
parent
58cbe7bf68
commit
d9d41248dd
Binary file not shown.
|
|
@ -110,7 +110,7 @@ MIDDLEWARE = [
|
|||
'django_user_agents.middleware.UserAgentMiddleware',
|
||||
'simple_history.middleware.HistoryRequestMiddleware',
|
||||
'auditlog.middleware.AuditlogMiddleware',
|
||||
'users.middleware.oauth.OAuthMiddleware'
|
||||
#'users.middleware.oauth.OAuthMiddleware'
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'digitaleagentur.urls'
|
||||
|
|
|
|||
|
|
@ -532,11 +532,11 @@ class UserFullName(User):
|
|||
return f'{self.first_name + " " + self.last_name}'
|
||||
|
||||
# Hier Audit-Logeinträge einbauen für die versch. Models
|
||||
from django.utils.six import python_2_unicode_compatible
|
||||
from auditlog.registry import auditlog
|
||||
#from django.utils.six import python_2_unicode_compatible
|
||||
#from auditlog.registry import auditlog
|
||||
|
||||
auditlog.register(User)
|
||||
auditlog.register(Agency)
|
||||
#auditlog.register(User)
|
||||
#auditlog.register(Agency)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ urlpatterns = [
|
|||
path('icspublicall/<slug:code>/<int:ag>', views.getICSFileExAll, name="geticsall"),
|
||||
path('updateuserorga/', views.UpdateUserOrga, name="update-user-orga"),
|
||||
# OAUTH
|
||||
path('oauth/callback/', views.oauthCallBack, name="oauthcallback"),
|
||||
#path('oauth/callback/', views.oauthCallBack, name="oauthcallback"),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -67,9 +67,6 @@ import base64
|
|||
from django.http import HttpResponse
|
||||
|
||||
|
||||
# OAUTH
|
||||
def oauthCallBack(request):
|
||||
return redirect('users-dashboard')
|
||||
|
||||
# NC LOGIN
|
||||
'''
|
||||
|
|
@ -85,7 +82,7 @@ from django.contrib.auth import login, logout
|
|||
def ncLogin(request, uid):
|
||||
logout(request)
|
||||
nc_login_headers = {'Authorization' : 'Bearer ' + request.COOKIES['nc_session_id']}
|
||||
r = requests.get("http://localhost:8080/ocs/v2.php/apps/user_status/api/v1/user_status", headers=nc_login_headers)
|
||||
r = requests.get(settings.NEXTCLOUD_URL + "ocs/v2.php/apps/user_status/api/v1/user_status", headers=nc_login_headers)
|
||||
xpars = xmltodict.parse(r.text)
|
||||
js = json.dumps(xpars)
|
||||
final_json = json.loads(js)
|
||||
|
|
|
|||
Loading…
Reference in New Issue