handle = Arc.container().instance(CurrentIdentityAssociation.class)) {
+ SecurityIdentity identity = handle.get().getIdentity();
+ return identity.isAnonymous() ? null : identity.getPrincipal().getName();
+ }
+ }
+}
diff --git a/src/main/java/eu/m724/talkpages/TemplateExtensions.java b/src/main/java/eu/m724/talkpages/template/TemplateExtensions.java
similarity index 95%
rename from src/main/java/eu/m724/talkpages/TemplateExtensions.java
rename to src/main/java/eu/m724/talkpages/template/TemplateExtensions.java
index 8133c66..a77da61 100644
--- a/src/main/java/eu/m724/talkpages/TemplateExtensions.java
+++ b/src/main/java/eu/m724/talkpages/template/TemplateExtensions.java
@@ -1,4 +1,4 @@
-package eu.m724.talkpages;
+package eu.m724.talkpages.template;
import io.quarkus.qute.TemplateExtension;
import jakarta.enterprise.context.ApplicationScoped;
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 36dcfc0..d5d713d 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -2,6 +2,8 @@ talkpages.homePage=/
talkpages.systemUser.name=System
talkpages.createExamplePage=true
+quarkus.http.auth.basic=true
+
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.datasource.db-kind=h2
diff --git a/src/main/resources/templates/AuthResource/auth.html b/src/main/resources/templates/AuthResource/auth.html
new file mode 100644
index 0000000..aeadc35
--- /dev/null
+++ b/src/main/resources/templates/AuthResource/auth.html
@@ -0,0 +1,18 @@
+Login
+
+To log in, submit your credentials.
+To register, submit desired credentials.
+
+{#if message != null}
+{message}
+{/if}
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/AuthResource/authenticated.html b/src/main/resources/templates/AuthResource/authenticated.html
new file mode 100644
index 0000000..38e56bf
--- /dev/null
+++ b/src/main/resources/templates/AuthResource/authenticated.html
@@ -0,0 +1,2 @@
+Logged in as {username}
+Log out
\ No newline at end of file
diff --git a/src/main/resources/templates/AuthResource/register.html b/src/main/resources/templates/AuthResource/register.html
new file mode 100644
index 0000000..8a371c2
--- /dev/null
+++ b/src/main/resources/templates/AuthResource/register.html
@@ -0,0 +1,13 @@
+Registering as {username}
+
+{#if message != null}
+{message}
+{/if}
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/IndexResource/index.html b/src/main/resources/templates/IndexResource/index.html
index 0b84d85..f1ec0f5 100644
--- a/src/main/resources/templates/IndexResource/index.html
+++ b/src/main/resources/templates/IndexResource/index.html
@@ -5,6 +5,11 @@
Running TalkPages version {config:["quarkus.application.version"]}
\ No newline at end of file