diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/SAMLClientCredentialsForm.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/SAMLClientCredentialsForm.java index 95dd490c9e..1790834707 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/SAMLClientCredentialsForm.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/SAMLClientCredentialsForm.java @@ -40,7 +40,7 @@ public class SAMLClientCredentialsForm extends Form { @FindBy(id = "uploadKeyAlias") private WebElement uploadKeyAlias; - @FindBy(id = "uploadStorePassword") + @FindBy(id = "uploadStorePas") private WebElement uploadStorePassword; public void importPemCertificateKey() { diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java index 017468625d..65510eb24f 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java @@ -48,7 +48,7 @@ public class LdapUserProviderForm extends Form { @FindBy(id = "ldapBindDn") private WebElement ldapBindDnInput; - @FindBy(id = "ldapBindCredential") + @FindBy(id = "ldapBindCred") private WebElement ldapBindCredentialInput; @FindBy(id = "customUserSearchFilter") diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/users/UserCredentials.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/users/UserCredentials.java index ff091a45ef..886cbb4494 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/users/UserCredentials.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/users/UserCredentials.java @@ -18,10 +18,10 @@ public class UserCredentials extends User { return super.getUriFragment() + "/user-credentials"; } - @FindBy(id = "password") + @FindBy(id = "newPas") private WebElement newPasswordInput; - @FindBy(id = "confirmPassword") + @FindBy(id = "confirmPas") private WebElement confirmPasswordInput; @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='temporaryPassword']]") diff --git a/themes/src/main/resources-product/theme/rh-sso/admin/resources/css/styles.css b/themes/src/main/resources-product/theme/rh-sso/admin/resources/css/styles.css index a1960ed2b9..b59b231fe2 100644 --- a/themes/src/main/resources-product/theme/rh-sso/admin/resources/css/styles.css +++ b/themes/src/main/resources-product/theme/rh-sso/admin/resources/css/styles.css @@ -409,3 +409,8 @@ table.kc-authz-table-expanded { padding-right:0!important; padding-left:0!important; } + +.password-conceal { + font-family: 'text-security-disc'; + font-size: 14px; +} diff --git a/themes/src/main/resources-product/theme/rh-sso/admin/theme.properties b/themes/src/main/resources-product/theme/rh-sso/admin/theme.properties index 5b489c1780..7efe91f5f5 100755 --- a/themes/src/main/resources-product/theme/rh-sso/admin/theme.properties +++ b/themes/src/main/resources-product/theme/rh-sso/admin/theme.properties @@ -1,3 +1,3 @@ parent=keycloak import=common/rh-sso -styles=lib/rcue/css/rcue.min.css lib/rcue/css/rcue-additions.min.css node_modules/select2/select2.css css/styles.css lib/angular/treeview/css/angular.treeview.css +styles=lib/rcue/css/rcue.min.css lib/rcue/css/rcue-additions.min.css node_modules/select2/select2.css css/styles.css lib/angular/treeview/css/angular.treeview.css node_modules/text-security/dist/text-security.css diff --git a/themes/src/main/resources/theme/base/admin/resources/js/app.js b/themes/src/main/resources/theme/base/admin/resources/js/app.js index 540f236b68..0e25ae9cdc 100755 --- a/themes/src/main/resources/theme/base/admin/resources/js/app.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/app.js @@ -2955,4 +2955,15 @@ module.filter('startFrom', function () { } return []; }; +}); + + +module.directive('kcPassword', function ($compile, Notifications) { + return { + restrict: 'A', + link: function ($scope, elem, attr, ctrl) { + elem.addClass("password-conceal"); + elem.attr("type","text"); + } + } }); \ No newline at end of file diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html b/themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html index 9ce157f152..8542060564 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/authenticator-config.html @@ -16,9 +16,6 @@
- - -
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-export.html b/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-export.html index 82e50b78f3..a1da8c1426 100644 --- a/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-export.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-export.html @@ -10,9 +10,6 @@

{{:: 'generate-private-key' | translate}}

- - -
@@ -34,16 +31,16 @@ {{:: 'key-alias.tooltip' | translate}}
- +
- +
{{:: 'key-password.tooltip' | translate}}
- +
- +
{{:: 'store-password.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-import.html b/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-import.html index ec88cd6f65..6ea01180f1 100644 --- a/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-import.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/client-credentials-jwt-key-import.html @@ -10,9 +10,6 @@

{{:: 'import-client-certificate' | translate}}

- - -
@@ -34,9 +31,9 @@ {{:: 'jwt-import.key-alias.tooltip' | translate}}
- +
- +
{{:: 'store-password.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/client-keys.html b/themes/src/main/resources/theme/base/admin/resources/partials/client-keys.html index c74f54f4fd..c412e27269 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/client-keys.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/client-keys.html @@ -8,9 +8,6 @@ - - -
{{:: 'import-keys-and-cert' | translate}} {{:: 'import-keys-and-cert.tooltip' | translate}}
@@ -33,16 +30,16 @@ {{:: 'key-alias.tooltip' | translate}}
- +
- +
{{:: 'key-password.tooltip' | translate}}
- +
- +
{{:: 'store-password.tooltip' | translate}}
@@ -85,9 +82,9 @@ Archive alias for your private key and certificate.
- +
- +
Password to access the private key in the archive
@@ -99,9 +96,9 @@ Realm certificate is stored in archive too. This is the alias to it.
- +
- +
Password to access the archive itself
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-export.html b/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-export.html index ec51e9674f..1c8f737326 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-export.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-export.html @@ -10,9 +10,6 @@

{{:: 'export-saml-key' | translate}} {{client.clientId|capitalize}}

- - -
@@ -34,9 +31,9 @@ {{:: 'key-alias.tooltip' | translate}}
- +
- +
{{:: 'key-password.tooltip' | translate}}
@@ -48,9 +45,9 @@ {{:: 'realm-certificate-alias.tooltip' | translate}}
- +
- +
{{:: 'store-password.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-import.html b/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-import.html index a580a61b18..5b14c24f60 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-import.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/client-saml-key-import.html @@ -10,9 +10,6 @@

{{:: 'import-saml-key' | translate}} {{client.clientId|capitalize}}

- - -
@@ -34,9 +31,9 @@ {{:: 'key-alias.tooltip' | translate}}
- +
- +
{{:: 'store-password.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-bitbucket.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-bitbucket.html index 90d5c1fbd4..9667b34518 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-bitbucket.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-bitbucket.html @@ -8,9 +8,6 @@ - - -
@@ -31,7 +28,7 @@
- +
{{:: 'bitbucket.secret.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-gitlab.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-gitlab.html index 152d1f1f40..9a30c52188 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-gitlab.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-gitlab.html @@ -8,9 +8,6 @@ - - -
@@ -31,7 +28,7 @@
- +
{{:: 'gitlab.application-secret.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-oidc.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-oidc.html index ee815a3b3c..54bbcd64a8 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-oidc.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-oidc.html @@ -9,9 +9,6 @@ - - -
@@ -172,7 +169,7 @@
- +
{{:: 'client-secret.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-openshift-v3.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-openshift-v3.html index 054b98ac43..3323e1d85c 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-openshift-v3.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-openshift-v3.html @@ -8,11 +8,6 @@ - - - - -
@@ -47,7 +42,7 @@
- +
{{:: 'social.client-secret.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-social.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-social.html index 1976fde114..191002f4da 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-social.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-identity-provider-social.html @@ -8,9 +8,6 @@ - - -
@@ -31,7 +28,7 @@
- +
{{:: 'social.client-secret.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-smtp.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-smtp.html index 43df76147c..d1a0d98acd 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-smtp.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-smtp.html @@ -2,9 +2,6 @@ - - -
@@ -79,9 +76,9 @@
- +
- +
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html b/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html index 5c2760531a..c35a767fd0 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/user-credentials.html @@ -7,22 +7,19 @@ - - -
{{:: 'manage-user-password' | translate}}
- +
- +
- +
- +
diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/user-storage-ldap.html b/themes/src/main/resources/theme/base/admin/resources/partials/user-storage-ldap.html index 0a391b9274..abf9045726 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/user-storage-ldap.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/user-storage-ldap.html @@ -8,9 +8,6 @@ - - -
{{:: 'required-settings' | translate}}
@@ -151,9 +148,9 @@ {{:: 'ldap.bind-dn.tooltip' | translate}}
- +
- +
{{:: 'ldap.bind-credential.tooltip' | translate}}
diff --git a/themes/src/main/resources/theme/keycloak/admin/resources/css/styles.css b/themes/src/main/resources/theme/keycloak/admin/resources/css/styles.css index 6f72a78cb3..8b0a4d36ac 100755 --- a/themes/src/main/resources/theme/keycloak/admin/resources/css/styles.css +++ b/themes/src/main/resources/theme/keycloak/admin/resources/css/styles.css @@ -399,4 +399,9 @@ table.kc-authz-table-expanded { .no-gutter > [class*='col-'] { padding-right:0!important; padding-left:0!important; +} + +.password-conceal { + font-family: 'text-security-disc'; + font-size: 14px; } \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/admin/theme.properties b/themes/src/main/resources/theme/keycloak/admin/theme.properties index 8519d8907c..83e4e92d6c 100755 --- a/themes/src/main/resources/theme/keycloak/admin/theme.properties +++ b/themes/src/main/resources/theme/keycloak/admin/theme.properties @@ -1,3 +1,3 @@ parent=base import=common/keycloak -styles=lib/patternfly/css/patternfly.css node_modules/select2/select2.css css/styles.css lib/angular/treeview/css/angular.treeview.css \ No newline at end of file +styles=lib/patternfly/css/patternfly.css node_modules/select2/select2.css css/styles.css lib/angular/treeview/css/angular.treeview.css node_modules/text-security/dist/text-security.css \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/.npmignore b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/.npmignore new file mode 100644 index 0000000000..2a11bc9b24 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/.npmignore @@ -0,0 +1,4 @@ +demo.html +.eslintrc* +.vscode/ +.idea/ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/LICENSE b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/LICENSE new file mode 100644 index 0000000000..a664c94276 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Oskari Noppa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/README.md b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/README.md new file mode 100644 index 0000000000..3f421f24e8 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/README.md @@ -0,0 +1,52 @@ +# text-security +Cross-browser alternative to `-webkit-text-security` + +This is a simple set of fonts that only consists of 3 different characters. +Disc circle and square . For example, setting `font-family: "text-security-circle"` for +an element should then display all the element's characters in a concealed +way, like it was a password field. + +This is useful if you want to get the benefits of `input[type="password"]` +but also combine that with other element types, like `input[type="tel"]`. In +fact, the project was created for this exact purpose [as an answer to a +StackOverflow +question](https://stackoverflow.com/questions/36935576/how-to-make-input-type-tel-work-as-type-password/36950075#36950075). + +## Installation +``` +npm install text-security +``` + +You can use the fonts by adding this repo as a dependency and including +`dist/text-security.css` in your project, like so + +`` + +## Building with custom modifications +If you want to make your own tweaks, the `npm run build` command has two +optional arguments for you. By default, 768 different unicode characters are +included in the fonts, making it reliable for different use-cases but also +adding quite a big font files as a dependency. You can use the +`--max={number}` option to reduce the amount of included unicode characters. + +If you are feeling wild, you can also add your custom shapes by dropping them +to *assets* folder and running the build with `--shapes={string}` option. The +value should be comma-separated list of svg file names (don't include the +file extension in the name). The default value is `circle,square,disc`. +The generated css will have class names with `text-security-*` prefix +followed by the name of the shape, like `text-security-disc`. + +## Demo +*demo.html* contains a proof-of-concept demo file, which you can just open in +any browser. The same thing can also be found [as a +fiddle](https://jsfiddle.net/449Lamue/6/). In development, you can also try +out the library by just including the css using RawGit `` \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/circle.svg b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/circle.svg new file mode 100644 index 0000000000..32095841b7 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/circle.svg @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/disc.svg b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/disc.svg new file mode 100644 index 0000000000..dbee77f1ff --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/disc.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/square.svg b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/square.svg new file mode 100644 index 0000000000..60dc8eb3e6 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/assets/square.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.eot b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.eot new file mode 100644 index 0000000000..6581a44717 Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.eot differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.svg b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.svg new file mode 100644 index 0000000000..4bd8ce8f87 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.svg @@ -0,0 +1,2316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.ttf b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.ttf new file mode 100644 index 0000000000..0f62fc3805 Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.ttf differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.woff b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.woff new file mode 100644 index 0000000000..675185141c Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-circle.woff differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.eot b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.eot new file mode 100644 index 0000000000..21f4c8738b Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.eot differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.svg b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.svg new file mode 100644 index 0000000000..f12aad29c7 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.svg @@ -0,0 +1,2316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.ttf b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.ttf new file mode 100644 index 0000000000..566a358672 Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.ttf differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.woff b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.woff new file mode 100644 index 0000000000..160d2898ba Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-disc.woff differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.eot b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.eot new file mode 100644 index 0000000000..25ec7c68c9 Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.eot differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.svg b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.svg new file mode 100644 index 0000000000..dd80a747c4 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.svg @@ -0,0 +1,2316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.ttf b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.ttf new file mode 100644 index 0000000000..bea2cf8ec0 Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.ttf differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.woff b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.woff new file mode 100644 index 0000000000..1c4b7a9974 Binary files /dev/null and b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security-square.woff differ diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security.css b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security.css new file mode 100644 index 0000000000..89e45814f8 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/dist/text-security.css @@ -0,0 +1,24 @@ +@font-face { + font-family: 'text-security-circle'; + src: url('text-security-circle.eot'); + src: url('text-security-circle.eot?#iefix') format('embedded-opentype'), + url('text-security-circle.woff') format('woff'), + url('text-security-circle.ttf') format('truetype'), + url('text-security-circle.svg#text-security') format('svg'); +} +@font-face { + font-family: 'text-security-square'; + src: url('text-security-square.eot'); + src: url('text-security-square.eot?#iefix') format('embedded-opentype'), + url('text-security-square.woff') format('woff'), + url('text-security-square.ttf') format('truetype'), + url('text-security-square.svg#text-security') format('svg'); +} +@font-face { + font-family: 'text-security-disc'; + src: url('text-security-disc.eot'); + src: url('text-security-disc.eot?#iefix') format('embedded-opentype'), + url('text-security-disc.woff') format('woff'), + url('text-security-disc.ttf') format('truetype'), + url('text-security-disc.svg#text-security') format('svg'); +} diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/index.js b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/index.js new file mode 100644 index 0000000000..7a48412ac3 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/index.js @@ -0,0 +1,89 @@ +var + icons2font = require('svgicons2svgfont'), + fs = require('fs'), + path = require('path'), + svg2ttf = require('svg2ttf'), + ttf2eot = require('ttf2eot'), + ttf2woff = require('ttf2woff'), + args = require('yargs').argv; +/** + * We need to loop through the unicode character list and pass them all for svgicons2svgfont. + * If you want to reduce the file-sizes with the cost of worse character support, you can + * specify --max={number} when building. This number will be the highest supported character + * code. For example, building with `npm run build -- --max=126` would only support the Basic Latin unicode block. + * + * @todo Perhaps this could be better achieved by just defining the notdef glyph? + * That would probably reduce the file sizes quite a bit, but I'm not quite sure how that would work with the + * tff and woff versions. + * @param {number=} [max=767] + */ +var MAX_VALUE = args.max || 767; +/** + * Comma-separated list of the supported shapes. + * @param {string} [shapes='circle,square,disc'] + */ +var SHAPES = args.shapes || 'circle,square,disc'; + +var styleTemplate = fs.readFileSync('style-template.css', 'utf-8'), stylesheet = '', + characters = []; + +for (var i = 0; i <= MAX_VALUE; i++){ + characters.push(String.fromCharCode(i)); +} + +function bufferFrom(source) { + return typeof Buffer.from === 'function' ? Buffer.from(source) : new Buffer(source); +} + +function logError(err) { + if (err) { + console.error(err); + } +} + +var DIST_DIR = path.join(__dirname, 'dist'); + +if (!fs.existsSync(DIST_DIR)) { + fs.mkdirSync(DIST_DIR); +} + +SHAPES.split(',').forEach(function (shape) { + var + fontName = 'text-security-' + shape, + fontPath = path.join(DIST_DIR, fontName), + fontStream = icons2font({ + fontName: fontName + }); + + fontStream + .pipe(fs.createWriteStream(fontPath + '.svg'))//Create the .svg font + .on('finish', function () { + //Create the other formats using the newly created font and Fontello's conversion libs + + var ttf = svg2ttf(fs.readFileSync(fontPath + '.svg', 'utf-8'), {}); + fs.writeFileSync(fontPath + '.ttf', bufferFrom(ttf.buffer), 'utf-8'); + + // ttf2eot and ttf2woff expect a buffer, while svg2ttf seems to expect a string + // this would be better read from the buffer, but will do for now + var ttfFile = fs.readFileSync(fontPath + '.ttf'); + + var eot = ttf2eot(ttfFile, {}); + fs.writeFile(fontPath + '.eot', bufferFrom(eot.buffer), 'utf-8', logError); + + var woff = ttf2woff(ttfFile, {}); + fs.writeFile(fontPath + '.woff', bufferFrom(woff.buffer), 'utf-8', logError); + }) + .on('error', logError); + + var glyph = fs.createReadStream(path.join(__dirname, 'assets', shape + '.svg')); + glyph.metadata = { + unicode: characters, + name: shape + }; + fontStream.write(glyph); + fontStream.end(); + //Append the new shape to the generated stylesheet + stylesheet += styleTemplate.replace(/\{\{shape}}/g, shape) + '\n'; +}); + +fs.writeFile(path.join(__dirname, 'dist', 'text-security.css'), stylesheet, logError); \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/package.json b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/package.json new file mode 100644 index 0000000000..bf7d7f1083 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/package.json @@ -0,0 +1,60 @@ +{ + "_from": "text-security@^1.0.1", + "_id": "text-security@1.0.1", + "_inBundle": false, + "_integrity": "sha512-Y5fStAKoEvLr6h2oz/nkSm+P3b5f3t+JAnNkycFJr15mz32XvrfBONjO+fNAnKaP5+YuD69tVNmlmKmfZu9ZGw==", + "_location": "/text-security", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "text-security@^1.0.1", + "name": "text-security", + "escapedName": "text-security", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/text-security/-/text-security-1.0.1.tgz", + "_shasum": "9a04f42c322123b1f1fffa49d1d62c638fe72ba3", + "_spec": "text-security@^1.0.1", + "_where": "/home/st/dev/keycloak/themes/src/main/resources/theme/keycloak/common/resources", + "author": { + "name": "Oskari Noppa" + }, + "bugs": { + "url": "https://github.com/noppa/text-security/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Cross-browser alternative to -webkit-text-security", + "devDependencies": { + "svg2ttf": "4.0.0", + "svgicons2svgfont": "5.0.0", + "ttf2eot": "2.0.0", + "ttf2woff": "2.0.1", + "yargs": "4.6.0" + }, + "homepage": "https://github.com/noppa/text-security#readme", + "keywords": [ + "-webkit-text-security", + "conceal", + "password" + ], + "license": "MIT", + "main": "index.js", + "name": "text-security", + "repository": { + "type": "git", + "url": "git+https://github.com/noppa/text-security.git" + }, + "scripts": { + "build": "node index.js", + "prebuild": "npm install", + "test": "" + }, + "version": "1.0.1" +} diff --git a/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/style-template.css b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/style-template.css new file mode 100644 index 0000000000..4691893525 --- /dev/null +++ b/themes/src/main/resources/theme/keycloak/common/resources/node_modules/text-security/style-template.css @@ -0,0 +1,8 @@ +@font-face { + font-family: 'text-security-{{shape}}'; + src: url('text-security-{{shape}}.eot'); + src: url('text-security-{{shape}}.eot?#iefix') format('embedded-opentype'), + url('text-security-{{shape}}.woff') format('woff'), + url('text-security-{{shape}}.ttf') format('truetype'), + url('text-security-{{shape}}.svg#text-security') format('svg'); +} \ No newline at end of file diff --git a/themes/src/main/resources/theme/keycloak/common/resources/package.json b/themes/src/main/resources/theme/keycloak/common/resources/package.json index f0150f0f1f..067ca36078 100644 --- a/themes/src/main/resources/theme/keycloak/common/resources/package.json +++ b/themes/src/main/resources/theme/keycloak/common/resources/package.json @@ -4,22 +4,23 @@ "description": "Keycloak Admin Console", "license": "Apache-2.0", "dependencies": { - "angular": "^1.6.6", - "angular-cookies": "^1.6.6", - "angular-loader": "^1.6.6", - "angular-resource": "^1.6.6", - "angular-route": "^1.6.6", - "angular-sanitize": "^1.6.6", - "angular-translate": "^2.15.1", - "angular-translate-loader-url": "^2.15.1", - "angular-treeview": "^0.1.5", - "angular-ui-select2": "^0.0.5", - "autofill-event": "^0.0.1", - "bootstrap": "^3.3.7", - "filesaver": "^0.0.13", - "font-awesome": "^4.7.0", - "jquery": "^3.2.1", - "ng-file-upload": "^12.2.13", - "select2": "3.5.1" + "angular": "1.6.6", + "angular-cookies": "1.6.6", + "angular-loader": "1.6.6", + "angular-resource": "1.6.6", + "angular-route": "1.6.6", + "angular-sanitize": "1.6.6", + "angular-translate": "2.15.1", + "angular-translate-loader-url": "2.15.1", + "angular-treeview": "0.1.5", + "angular-ui-select2": "0.0.5", + "autofill-event": "0.0.1", + "bootstrap": "3.3.7", + "filesaver": "0.0.13", + "font-awesome": "4.7.0", + "jquery": "3.2.1", + "ng-file-upload": "12.2.13", + "select2": "3.5.1", + "text-security": "1.0.1" } }