def get(self): """ :return: """ tool_conf = settings.LTI_TOOL_CONFIG launch_data_storage = FlaskCacheDataStorage(cache) flask_request = FlaskRequest() target_link_uri = flask_request.get_param('target_link_uri') if not target_link_uri: raise Exception('Missing "target_link_uri" param') logs.api_logger.info("LTI Login", extra={ "clientip": request.remote_addr, "path": request.path, "user": request.remote_user }) oidc_login = FlaskOIDCLogin(flask_request, tool_conf, launch_data_storage=launch_data_storage) return oidc_login.enable_check_cookies().redirect(target_link_uri)
def login(): tool_conf = ToolConfJsonFile(get_lti_config_path()) launch_data_storage = get_launch_data_storage() flask_request = FlaskRequest() target_link_uri = flask_request.get_param('target_link_uri') if not target_link_uri: raise Exception('Missing "target_link_uri" param') oidc_login = FlaskOIDCLogin(flask_request, tool_conf, launch_data_storage=launch_data_storage) return oidc_login\ .enable_check_cookies()\ .redirect(target_link_uri)