diff --git a/README.md b/README.md
index 663a0be..03f842c 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,7 @@ Keywind is a component-based Keycloak Login Theme built with [Tailwind CSS](http
- Login Update Password
- Login Update Profile
- Login Username
+- Login X.509 Info
- Logout Confirm
- Register
- Select Authenticator
diff --git a/html/login/login-x509-info.html b/html/login/login-x509-info.html
new file mode 100644
index 0000000..c598e69
--- /dev/null
+++ b/html/login/login-x509-info.html
@@ -0,0 +1,65 @@
+
+
+ Sign in to
+
+
+
+
+
+
+
+
+
+
+
+ Keywind
+
+
Sign In
+
+
+
+ Example of an error message
+
+
+
+ X509 client certificate:
+
+
+ CN=User, C=US, O=Keywind
+
+
+
+ You will be logged in as: Username
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/java/org/keywind/theme/LoginDataModel.java b/src/test/java/org/keywind/theme/LoginDataModel.java
index 1641d5d..be3e333 100644
--- a/src/test/java/org/keywind/theme/LoginDataModel.java
+++ b/src/test/java/org/keywind/theme/LoginDataModel.java
@@ -25,6 +25,7 @@ public class LoginDataModel {
dataModel.put("url", createUrlModel());
dataModel.put("user", createUserModel());
dataModel.put("username", "Username");
+ dataModel.put("x509", createX509Model());
dataModel.putAll(createWebAuthnModel());
return dataModel;
@@ -249,4 +250,16 @@ public class LoginDataModel {
return webAuthn;
}
+
+ private static Map createX509Model() {
+ Map formData = new HashMap<>();
+ formData.put("isUserEnabled", "true");
+ formData.put("subjectDN", "CN=User, C=US, O=Keywind");
+ formData.put("username", "Username");
+
+ Map x509 = new HashMap<>();
+ x509.put("formData", formData);
+
+ return x509;
+ }
}
diff --git a/theme/keywind/login/login-x509-info.ftl b/theme/keywind/login/login-x509-info.ftl
new file mode 100644
index 0000000..70d8432
--- /dev/null
+++ b/theme/keywind/login/login-x509-info.ftl
@@ -0,0 +1,40 @@
+<#import "template.ftl" as layout>
+<#import "components/atoms/button.ftl" as button>
+<#import "components/atoms/button-group.ftl" as buttonGroup>
+<#import "components/atoms/form.ftl" as form>
+<#import "components/atoms/link.ftl" as link>
+
+<@layout.registrationLayout; section>
+ <#if section = "header">
+ ${msg("doLogIn")}
+ <#elseif section = "form">
+
+
${msg("clientCertificate")}
+
+ <#if x509.formData.subjectDN??>
+ ${(x509.formData.subjectDN!"")}
+ <#else>
+ ${msg("noCertificate")}
+ #if>
+
+
+ <#if x509.formData.isUserEnabled??>
+
+ ${msg("doX509Login")}
+ ${(x509.formData.username!'')}
+
+ #if>
+ <@form.kw action=url.loginAction method="post">
+ <@buttonGroup.kw>
+ <@button.kw color="primary" name="login" type="submit">
+ ${msg("doContinue")}
+ @button.kw>
+ <#if x509.formData.isUserEnabled??>
+ <@button.kw color="secondary" name="cancel" type="submit">
+ ${msg("doIgnore")}
+ @button.kw>
+ #if>
+ @buttonGroup.kw>
+ @form.kw>
+ #if>
+@layout.registrationLayout>