[Django-freeradius] [api] Improve robustness of TokenAuthentication
At this line: https://github.com/openwisp/django-freeradius/blob/master/django_freeradius/api/views.py#L29
The code would fail if the authorization header does not contain any space. Proceed as follows:
replicate the issue in a test case (this is also called Test Driven Development) once the test fails, fix the code so it doesn't fail.
Don't forget to start and fork the github repository linked in this task, this will help us for the reason described in our page Help us to grow.
What is django-freeradius?
Django Freeradius is a web interface and REST API to administrate and interact with freeradius, a very popular implementation of the radius protocol.
The freeradius web interface is designed to allow users to easily configure and monitor most of the freeradius features.