[gd_scene load_steps=11 format=2]
[ext_resource path="res://WebServerSimple.gd" type="Script" id=1]
[ext_resource path="res://WebRoot.gd" type="Script" id=2]
[ext_resource path="res://HTTPSessionManagerDB.gd" type="Script" id=3]
[ext_resource path="res://Main.gd" type="Script" id=4]
[ext_resource path="res://Login.gd" type="Script" id=5]
[ext_resource path="res://Register.gd" type="Script" id=6]
[ext_resource path="res://Settings.gd" type="Script" id=7]
[sub_resource type="SessionSetupWebServerMiddleware" id=3]
[sub_resource type="UserSessionSetupWebServerMiddleware" id=4]
[sub_resource type="CSRFTokenWebServerMiddleware" id=5]
ignored_urls = PoolStringArray( "/user/login", "/user/register" )
[node name="Main" type="Node"]
script = ExtResource( 4 )
[node name="UserManagerDB" type="UserManagerDB" parent="."]
[node name="WebServerSimple" type="WebServerSimple" parent="."]
script = ExtResource( 1 )
[node name="WebRoot" type="WebRoot" parent="WebServerSimple"]
www_root_path = "res://www/"
middlewares = [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ]
script = ExtResource( 2 )
[node name="StaticWebPage" type="StaticWebPage" parent="WebServerSimple/WebRoot"]
uri_segment = "/"
data = "
You can go and log in on the users page here:
Login
Note that in this demo sessions and users are saved in an SQLite database here: \"user://database.sqlite\"
There are no users by default.
"
[node name="UserWebPage" type="UserWebPage" parent="WebServerSimple/WebRoot"]
uri_segment = "user"
logged_out_render_type = 1
logged_out_redirect_url = "/user/login"
[node name="Login" type="UserLoginWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
uri_segment = "login"
logged_in_render_type = 1
logged_in_redirect_url = "/"
script = ExtResource( 5 )
[node name="Register" type="UserRegisterWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
uri_segment = "register"
logged_in_render_type = 1
logged_in_redirect_url = "/"
redirect_on_success_url = "/user/login"
script = ExtResource( 6 )
[node name="Logout" type="UserLogoutWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
uri_segment = "logout"
logged_out_render_type = 1
logged_out_redirect_url = "/"
[node name="Settings" type="UserSettingsWebPage" parent="WebServerSimple/WebRoot/UserWebPage"]
uri_segment = "settings"
logged_out_render_type = 1
logged_out_redirect_url = "/user/login"
script = ExtResource( 7 )
[node name="HTTPSessionManagerDB" type="HTTPSessionManagerDB" parent="WebServerSimple"]
script = ExtResource( 3 )
[connection signal="user_registered" from="WebServerSimple/WebRoot/UserWebPage/Register" to="WebServerSimple/WebRoot/UserWebPage/Register" method="_on_Register_user_registered"]