src/fastapi_aad_auth/_base/authenticators/session.py
def process_login_request(self, request, force=False, redirect='/'):
        """Process the provider login request."""
        self.logger.debug(f'Logging in - request url {request.url}')
        auth_state = self._session_validator.get_state_from_session(request)
        force = request.query_params.get('force', force)
        if auth_state.is_authenticated() and not force:
            self.logger.debug(f'Authenticated - redirecting {auth_state}')
            response = self.redirect_if_authenticated(auth_state)
        else:
            # Set the redirect parameter here
            self._session_validator.set_post_auth_redirect(request, request.query_params.get('redirect', redirect))
            self.logger.debug(f'No Auth state - redirecting to provider login {auth_state}')
            response = self.redirect_to_provider_login(auth_state, request)
        return response
Process the provider login request.
Process the provider login request.
Process the provider login request .
def process_login_request(self, request, force=False, redirect='/'):
        self.logger.debug(f'Logging in - request url {request.url}')
        auth_state = self._session_validator.get_state_from_session(request)
        force = request.query_params.get('force', force)
        if auth_state.is_authenticated() and not force:
            self.logger.debug(f'Authenticated - redirecting {auth_state}')
            response = self.redirect_if_authenticated(auth_state)
        else:
            self._session_validator.set_post_auth_redirect(request, request.query_params.get('redirect', redirect))
            self.logger.debug(f'No Auth state - redirecting to provider login {auth_state}')
            response = self.redirect_to_provider_login(auth_state, request)
        return response
def process_login_request ( self , request , force = False , redirect = '/' ) : self . logger . debug ( f'Logging in - request url {request.url}' ) auth_state = self . _session_validator . get_state_from_session ( request ) force = request . query_params . get ( 'force' , force ) if auth_state . is_authenticated ( ) and not force : self . logger . debug ( f'Authenticated - redirecting {auth_state}' ) response = self . redirect_if_authenticated ( auth_state ) else : self . _session_validator . set_post_auth_redirect ( request , request . query_params . get ( 'redirect' , redirect ) ) self . logger . debug ( f'No Auth state - redirecting to provider login {auth_state}' ) response = self . redirect_to_provider_login ( auth_state , request ) return response
Process the provider login request.
Process the provider login request .
"""Process the provider login request.""" # Set the redirect parameter here
self
request
force
redirect