-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from OSC/generic_theme
Separate osc/awesim into theme overrides and generic base theme
- Loading branch information
Showing
15 changed files
with
122 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,100 @@ | ||
# OSC Keycloak theme | ||
# OnDemand Keycloak theme | ||
|
||
This basic theme works for both OSC and AweSim realms. It assumes the realm names will be osc and awesim. | ||
The logo that appears above the menu is `${realm.name!}-logo.png` i.e. `awesim-logo.png` or `osc-logo.png`. | ||
Currently updated to work with Keycloak 3.4.1. | ||
|
||
Install by cloning this repo to /opt/keycloak-3.0.0.Final/themes/osc. Then make the files read only by the user keycloak. | ||
## Install | ||
|
||
1. cd to keycloak/themes directory | ||
2. git clone or wget and untar this repo, renaming the directory to `ood-keycloak` | ||
3. create an override theme based on this (examples under `example_overrides`) or use base theme as it is | ||
|
||
|
||
i.e. | ||
|
||
|
||
``` | ||
cd /opt/keycloak-3.4.1/themes | ||
git clone https://github.com/OSC/keycloak-theme.git ood-keycloak | ||
cp -r ood-keycloak/example_overrides/awesim awesim | ||
cp -r ood-keycloak/example_overrides/osc osc | ||
# choose awesim or osc for appropriate realms | ||
``` | ||
|
||
## Configuring | ||
|
||
Example theme override: | ||
|
||
``` | ||
awesim/ | ||
└── login | ||
├── messages | ||
│ └── messages_en.properties | ||
├── resources | ||
│ └── img | ||
│ ├── favicon.ico | ||
│ └── logo.png | ||
└── theme.properties | ||
``` | ||
|
||
* login/messages/messages_en.properties: | ||
|
||
``` | ||
logintitle=Login to the Ohio Supercomputer Center | ||
loginTitleHtml=<p class="lead">Log in with your OSC username and password.</p> | ||
summary=The Ohio Super Computer Center (OSC) | ||
``` | ||
|
||
* theme.properties | ||
|
||
``` | ||
parent=ood-keycloak | ||
oodFooterLinks="Forgot your password?==https://www.osc.edu/content/password_change_policy_faqs,,Need Help?==https://www.osc.edu/contact/supercomputing_support,,Register for a new account==https://www.awesim.org/en/signup" | ||
``` | ||
|
||
|
||
|
||
## Maintaining | ||
|
||
The login.ftl template has been modified from the original in base/login/login.ftl. | ||
When upgrading to a new version of KeyCloak, verify that this base template did not change. | ||
|
||
``` | ||
$ diff /opt/keycloak-3.0.0.Final/themes/base/login/login.ftl /opt/keycloak-2.5.4.Final/themes/base/login/login.ftl | ||
$ diff /opt/keycloak-3.4.1.Final/themes/base/login/login.ftl /opt/keycloak-3.0.0.Final/themes/base/login/login.ftl | ||
$ | ||
``` | ||
|
||
Only login.ftl has been modified, so if the user may access another page that uses a different template, we might consider adding the logo to template.ftl instead. | ||
|
||
### TODO | ||
|
||
- [ ] build custom bootstrap - remove css you don't need | ||
- [ ] if we should vary the create new account link between awesim and ondemand, use this: | ||
## LICENSE | ||
|
||
``` | ||
<#if realm.name = 'osc'>add osc link here</#if> | ||
<#if realm.name = 'awesim'>add awesim link here</#if> | ||
``` | ||
- Code licensed under MIT License | ||
- Brand icons are not. All OSC and AweSim brand icons are trademarks of OSC. | ||
These icons should only be used to represent OSC. | ||
Please do not use brand logos for any purpose except to represent | ||
that particular brand or service. | ||
|
||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Ohio Supercomputer Center | ||
|
||
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. |
3 changes: 3 additions & 0 deletions
3
example_overrides/awesim/login/messages/messages_en.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
logintitle=Login to the Ohio Supercomputer Center | ||
loginTitleHtml=<p class="lead">Log in with your OSC username and password.</p> | ||
summary=The Ohio Super Computer Center (OSC) |
Binary file not shown.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
parent=ood-keycloak | ||
|
||
oodFooterLinks=Forgot your password?==https://www.osc.edu/content/password_change_policy_faqs,,Need Help?==https://www.osc.edu/contact/supercomputing_support,,Register for a new account==https://www.awesim.org/en/signup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
logintitle=Login to the Ohio Supercomputer Center | ||
loginTitleHtml=<p class="lead">Log in with your OSC username and password.</p> | ||
summary=The Ohio Super Computer Center (OSC) |
Binary file not shown.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
parent=ood-keycloak | ||
|
||
oodFooterLinks=Forgot your password?==https://www.osc.edu/content/password_change_policy_faqs,,Need Help?==https://www.osc.edu/contact/supercomputing_support,,Register for a new account==https://www.osc.edu/resources/getting_started/allocations_and_accounts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
logintitle=Login to the Ohio Supercomputer Center | ||
loginTitleHtml=<p class="lead">Log in with your OSC username and password.</p> | ||
summary=The Ohio Super Computer Center (OSC) | ||
logintitle=Login to Open OnDemand | ||
loginTitleHtml=<p class="lead">Log in with your HPC username and password.</p> | ||
summary=Open OnDemand |
Empty file.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters