Skip to content
Snippets Groups Projects
Commit f879c581 authored by Reinder Kraaij's avatar Reinder Kraaij :eye:
Browse files

Merge branch 'TMSS-2904-Authentication_state' into 'master'

use GET for  query_params and have code the same as Release 100

See merge request !1298
parents e8904548 f4bafc02
No related branches found
No related tags found
1 merge request!1298use GET for query_params and have code the same as Release 100
...@@ -67,10 +67,10 @@ def revoke_token_deauth(request, *args, **kwargs): ...@@ -67,10 +67,10 @@ def revoke_token_deauth(request, *args, **kwargs):
invalidate_token.delete() invalidate_token.delete()
return HttpResponse(status=204) return HttpResponse(status=204)
@api_view(['GET'])
def authentication_state(request): def authentication_state(request):
if not request.user.is_authenticated: if not request.user.is_authenticated:
username = request.query_params.get('username', None) username = request.GET.get('username', None)
if username: if username:
# Check websocket token against known token for given username, to hint to the frontend that the user has # Check websocket token against known token for given username, to hint to the frontend that the user has
# an active session. Proposed solution from TMSS-2904. # an active session. Proposed solution from TMSS-2904.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment