def auth_complete(request, backend, user, *args, **kwargs):
 if request.session.get(PIPELINE_KEY):
  data = request.session.pop(PIPELINE_KEY)
  kwargs = kwargs.copy()
  if user:
   kwargs['user'] = user
  (idx, xargs, xkwargs) = backend.from_session_dict(data, request=request, *args, **kwargs)
  if (('backend' in xkwargs) and (xkwargs['backend'].name == backend.AUTH_BACKEND.name)):
   return backend.continue_pipeline(pipeline_index=idx, *xargs, **xkwargs)
 return backend.auth_complete(user=user, request=request, *args, **kwargs)

def auth_complete ( request , backend , user , * args , ** kwargs ) : if request . session . get ( PIPELINE_KEY ) : data = request . session . pop ( PIPELINE_KEY ) kwargs = kwargs . copy ( ) if user : kwargs [ 'user' ] = user ( idx , xargs , xkwargs ) = backend . from_session_dict ( data , request = request , * args , ** kwargs ) if ( ( 'backend' in xkwargs ) and ( xkwargs [ 'backend' ] . name == backend . AUTH_BACKEND . name ) ) : return backend . continue_pipeline ( pipeline_index = idx , * xargs , ** xkwargs ) return backend . auth_complete ( user = user , request = request , * args , ** kwargs )
complete auth process .