diff --git a/README.md b/README.md index dc6104d..53fd07a 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,50 @@ Keywind is a component-based Keycloak Login & E-Mail Theme built with [Tailwind - Stack Overflow - Twitter +### Styled Pages + +- Error +- Login +- Login Config TOTP +- Login IDP Link Confirm +- Login OAuth Grant +- Login OTP +- Login Page Expired +- Login Password +- Login Recovery Authn Code Config +- Login Recovery Authn Code Input +- Login Reset Password +- Login Update Password +- Login Update Profile +- Login Username +- Login X.509 Info +- Logout Confirm +- Register +- Select Authenticator +- Terms and Conditions +- WebAuthn Authenticate +- WebAuthn Error +- WebAuthn Register + +### Identity Provider Icons + +- Apple +- Bitbucket +- Discord +- Facebook +- GitHub +- GitLab +- Google +- Instagram +- LinkedIn +- Microsoft +- OpenID +- Red Hat OpenShift +- PayPal +- Slack +- Stack Overflow +- Twitter + ## Installation Keywind has been designed with component-based architecture from the start, and **you can customize as little or as much Keywind as you need**: 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

+
+
+ +
+
+ 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 x509.formData.isUserEnabled??> +
+ ${msg("doX509Login")} + ${(x509.formData.username!'')} +
+ + <@form.kw action=url.loginAction method="post"> + <@buttonGroup.kw> + <@button.kw color="primary" name="login" type="submit"> + ${msg("doContinue")} + + <#if x509.formData.isUserEnabled??> + <@button.kw color="secondary" name="cancel" type="submit"> + ${msg("doIgnore")} + + + + + +