def get_authenticated_user(auth_provider, username, uid):
 match = models.DjangoStorage.user.get_social_auth(provider=auth_provider.backend_name, uid=uid)
 if ((not match) or (match.user.username != username)):
  raise User.DoesNotExist
 user = match.user
 user.backend = auth_provider.get_authentication_backend()
 return user

def get_authenticated_user ( auth_provider , username , uid ) : match = models . DjangoStorage . user . get_social_auth ( provider = auth_provider . backend_name , uid = uid ) if ( ( not match ) or ( match . user . username != username ) ) : raise User . DoesNotExist user = match . user user . backend = auth_provider . get_authentication_backend ( ) return user
gets a saved user authenticated by a particular backend .