500 error on service authentication - TangentMicroServices/MicroSerivcesWiki GitHub Wiki
500 : INTERNAL SERVER ERROR http://projectservice.staging.tangentmicroservices.com/api-explorer/api-docs/
-
ssh into the server and start up the service environment
-
open a python shell
python manage.py shell
-
Run the authentication code
from tokenauth.authbackends import * bke=TokenAuthBackend() bke.authenticate("<token>")
If you get the following error:
IntegrityError: duplicate key value violates unique constraint "auth_user_username_key"
DETAIL: Key (username)=(bloggs) already exists.
Then login to the admin panel of that service, delete the user and try again