Skip to content

Commit

Permalink
Add Auth_Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanJField committed Nov 24, 2023
1 parent 7cb72ba commit 1506fe5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ session_port.log
session_address.log
coverage.xml
.coverage
.DS_Store
9 changes: 8 additions & 1 deletion data_management/rest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
from django_filters import constants, filters
from django.contrib.auth.models import Group
from django.contrib.auth import get_user_model
from django.http import Http404
from django.http import Http404, JsonResponse
from django.shortcuts import get_object_or_404
from django.db.models import Q
from django.conf import settings

from data_management import models, object_storage, settings
from data_management import object_storage
Expand Down Expand Up @@ -563,3 +564,9 @@ class CodeRunViewSet(BaseViewSet, mixins.UpdateModelMixin, mixins.DestroyModelMi
data['renderer_classes'] = BaseViewSet.renderer_classes + [TextRenderer]
globals()[name + "ViewSet"] = type(name + "ViewSet", (BaseViewSet,), data)

def auth_provider(request):
"""Returns Auth Provider in Json Format"""
_data = {
"Auth_Provider":settings.AUTH_METHOD
}
return JsonResponse(_data)
1 change: 1 addition & 0 deletions data_management/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
path('data/<str:name>', views.get_data),
path('api/data/<str:checksum>', api_views.ObjectStorageView.as_view()),
path('api/data', api_views.ObjectStorageView.as_view()),
path('api/auth-provider', api_views.auth_provider),
path('logout', views.logout),
]

Expand Down

0 comments on commit 1506fe5

Please sign in to comment.