src/fastapi_aad_auth/_base/authenticators/session.py
def process_login_callback(self, request):
        """Process the provider login callback."""
        if 'error' in request.query_params:
            error_args = [request.query_params['error'], ]
            if 'error_description' in request.query_params:
                error_args.append(request.query_params['error_description'])
            raise ConfigurationError(*error_args)
        code = request.query_params.get('code', None)
        state = request.query_params.get('state', None)
        if state is None or code is None:
            return  # not authenticated
        auth_state = self._session_validator.get_state_from_session(request)
        auth_state.check_session_state(state)
        token = self._process_code(request, auth_state, code)
        user = self._get_user_from_token(token)
        authenticated_state = AuthenticationState.authenticate_as(user, self._session_validator._session_serializer, request.session)
        redirect = self._session_validator.pop_post_auth_redirect(request)
        return self.redirect_if_authenticated(authenticated_state, redirect=redirect)
Process the provider login callback.
Process the provider login callback.
Process the provider login callback .
def process_login_callback(self, request):
        if 'error' in request.query_params:
            error_args = [request.query_params['error'], ]
            if 'error_description' in request.query_params:
                error_args.append(request.query_params['error_description'])
            raise ConfigurationError(*error_args)
        code = request.query_params.get('code', None)
        state = request.query_params.get('state', None)
        if state is None or code is None:
            return  
        auth_state = self._session_validator.get_state_from_session(request)
        auth_state.check_session_state(state)
        token = self._process_code(request, auth_state, code)
        user = self._get_user_from_token(token)
        authenticated_state = AuthenticationState.authenticate_as(user, self._session_validator._session_serializer, request.session)
        redirect = self._session_validator.pop_post_auth_redirect(request)
        return self.redirect_if_authenticated(authenticated_state, redirect=redirect)
def process_login_callback ( self , request ) : if 'error' in request . query_params : error_args = [ request . query_params [ 'error' ] , ] if 'error_description' in request . query_params : error_args . append ( request . query_params [ 'error_description' ] ) raise ConfigurationError ( * error_args ) code = request . query_params . get ( 'code' , None ) state = request . query_params . get ( 'state' , None ) if state is None or code is None : return auth_state = self . _session_validator . get_state_from_session ( request ) auth_state . check_session_state ( state ) token = self . _process_code ( request , auth_state , code ) user = self . _get_user_from_token ( token ) authenticated_state = AuthenticationState . authenticate_as ( user , self . _session_validator . _session_serializer , request . session ) redirect = self . _session_validator . pop_post_auth_redirect ( request ) return self . redirect_if_authenticated ( authenticated_state , redirect = redirect )
Process the provider login callback.
Process the provider login callback .
"""Process the provider login callback.""" # not authenticated
self
request