I am trying to use Django Authentication but with external web service calls. By calling a web service with a username and password payload. Is there any tutorial or possibility to do that? I am trying with the Remote User but it is not working. I am able to reach the point that authenticate call is working but still stuck with the login page
class AppRemoteUserBackend (RemoteUserBackend):
create_unknown_user = True
def authenticate (self, **credentials):
//getting the user info by webservie call
customer = CustomerManagementService.getSelf(credentials)
myUser= MyUser ()
myUser.info= customer
myUser.id = customer['id']
myUser.username = credentials['username']
t = myUser.is_authenticated()
return myUser
from django.contrib.auth.models import User
class MyUser (User):
objects = None
username = ""
info= ""
def get_group_permissions (self):
return []
def get_and_delete_messages (self):
return []