commit
18268f686c
33 changed files with 225 additions and 52 deletions
|
@ -12,6 +12,8 @@ import java.util.Properties;
|
|||
*/
|
||||
public class Version {
|
||||
public static final String UNKNOWN = "UNKNOWN";
|
||||
public static String NAME;
|
||||
public static String NAME_HTML;
|
||||
public static String VERSION;
|
||||
public static String RESOURCES_VERSION;
|
||||
public static String BUILD_TIME;
|
||||
|
@ -21,6 +23,8 @@ public class Version {
|
|||
InputStream is = Version.class.getResourceAsStream("/keycloak-version.properties");
|
||||
try {
|
||||
props.load(is);
|
||||
Version.NAME = props.getProperty("name");
|
||||
Version.NAME_HTML = props.getProperty("name-html");
|
||||
Version.VERSION = props.getProperty("version");
|
||||
Version.BUILD_TIME = props.getProperty("build-time");
|
||||
Version.RESOURCES_VERSION = Version.VERSION.toLowerCase();
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
name=${product.name}
|
||||
name-html=${product.name-html}
|
||||
version=${product.version}
|
||||
build-time=${product.build-time}
|
|
@ -9,6 +9,8 @@ import java.util.*;
|
|||
public class RealmRepresentation {
|
||||
protected String id;
|
||||
protected String realm;
|
||||
protected String displayName;
|
||||
protected String displayNameHtml;
|
||||
protected Integer notBefore;
|
||||
protected Boolean revokeRefreshToken;
|
||||
protected Integer accessTokenLifespan;
|
||||
|
@ -129,6 +131,22 @@ public class RealmRepresentation {
|
|||
this.realm = realm;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getDisplayNameHtml() {
|
||||
return displayNameHtml;
|
||||
}
|
||||
|
||||
public void setDisplayNameHtml(String displayNameHtml) {
|
||||
this.displayNameHtml = displayNameHtml;
|
||||
}
|
||||
|
||||
public List<UserRepresentation> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# Common messages
|
||||
enabled=Enabled
|
||||
name=Name
|
||||
displayName=Display name
|
||||
displayNameHtml=HTML Display name
|
||||
save=Save
|
||||
cancel=Cancel
|
||||
onText=ON
|
||||
|
|
|
@ -9,6 +9,20 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label" for="name">{{:: 'displayName' | translate}}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" id="displayName" name="displayName" data-ng-model="realm.displayName">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label" for="name">{{:: 'displayNameHtml' | translate}}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" id="displayNameHtml" name="displayNameHtml" data-ng-model="realm.displayNameHtml">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label" for="enabled">{{:: 'enabled' | translate}}</label>
|
||||
<div class="col-md-6">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
${msg("emailLinkIdpTitle", idpAlias)}
|
||||
<#elseif section = "form">
|
||||
<p id="instruction1" class="instruction">
|
||||
${msg("emailLinkIdp1", idpAlias, brokerContext.username, realm.name)}
|
||||
${msg("emailLinkIdp1", idpAlias, brokerContext.username, realm.displayName)}
|
||||
</p>
|
||||
<p id="instruction2" class="instruction">
|
||||
${msg("emailLinkIdp2")} <a href="${url.firstBrokerLoginUrl}">${msg("doClickHere")}</a> ${msg("emailLinkIdp3")}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<#if section = "title">
|
||||
${msg("oauthGrantTitle")}
|
||||
<#elseif section = "header">
|
||||
${msg("oauthGrantTitleHtml",(realm.name!''))} <strong><#if client.name??>${advancedMsg(client.name)}<#else>${client.clientId}</#if></strong>.
|
||||
${msg("oauthGrantTitleHtml",(realm.displayNameHtml!''))} <strong><#if client.name??>${advancedMsg(client.name)}<#else>${client.clientId}</#if></strong>.
|
||||
<#elseif section = "form">
|
||||
<div id="kc-oauth" class="content-area">
|
||||
<h3>${msg("oauthGrantRequest")}</h3>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<#import "template.ftl" as layout>
|
||||
<@layout.registrationLayout; section>
|
||||
<#if section = "title">
|
||||
${msg("loginTitle",realm.name)}
|
||||
${msg("loginTitle",realm.displayName)}
|
||||
<#elseif section = "header">
|
||||
${msg("loginTitleHtml",realm.name)}
|
||||
${msg("loginTitleHtml",realm.displayNameHtml)}
|
||||
<#elseif section = "form">
|
||||
<form id="kc-totp-login-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
|
||||
<div class="${properties.kcFormGroupClass!}">
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<#import "template.ftl" as layout>
|
||||
<@layout.registrationLayout displayInfo=social.displayInfo; section>
|
||||
<#if section = "title">
|
||||
${msg("loginTitle",(realm.name!''))}
|
||||
${msg("loginTitle",(realm.displayName!''))}
|
||||
<#elseif section = "header">
|
||||
${msg("loginTitleHtml",(realm.name!''))}
|
||||
${msg("loginTitleHtml",(realm.displayNameHtml!''))}
|
||||
<#elseif section = "form">
|
||||
<#if realm.password>
|
||||
<form id="kc-form-login" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
|
||||
|
|
|
@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos no configurat
|
|||
bypassKerberosDetail=O b\u00E9 no est\u00E0s identificat mitjan\u00E7ant Kerberos o el teu navegador no est\u00E0 configurat per identificar-se mitjan\u00E7ant Kerberos. Si us plau fes clic per identificar-te per un altre mitj\u00E0.
|
||||
kerberosNotSetUp=Kerberos no est\u00E0 configurat. No pots identificar-te.
|
||||
registerWithTitle=Registra''t amb {0}
|
||||
registerWithTitleHtml=Registra''t amb <strong>{0}</strong>
|
||||
registerWithTitleHtml={0}
|
||||
loginTitle=Inicia sessi\u00F3 a {0}
|
||||
loginTitleHtml=Inicia sessi\u00F3 a <strong>{0}</strong>
|
||||
loginTitleHtml={0}
|
||||
impersonateTitle={0}\u00A0Personifica Usuari
|
||||
impersonateTitleHtml=<strong>{0}</strong> Personifica Usuari</strong>
|
||||
realmChoice=Domini
|
||||
|
@ -26,7 +26,7 @@ loginTotpTitle=Configura la teva aplicaci\u00F3 d''identificaci\u00F3 m\u00F2bil
|
|||
loginProfileTitle=Actualitza la informaci\u00F3 del teu compte
|
||||
loginTimeout=Has trigat massa a identificar-te. Inicia de nou la identificaci\u00F3.
|
||||
oauthGrantTitle=Concessi\u00F3 OAuth
|
||||
oauthGrantTitleHtml=Acc\u00E9s temporal per <strong>{0}</strong> sol\u00B7licitat per
|
||||
oauthGrantTitleHtml={0}
|
||||
errorTitle=Ho sentim...
|
||||
errorTitleHtml=Ho <strong>sentim</strong>...
|
||||
emailVerifyTitle=Verificaci\u00F3 de l''email
|
||||
|
|
|
@ -19,9 +19,9 @@ recaptchaNotConfigured=Recaptcha is required, but not configured
|
|||
consentDenied=Consent denied.
|
||||
|
||||
registerWithTitle=Registrierung bei {0}
|
||||
registerWithTitleHtml=Registrierung bei <strong>{0}</strong>
|
||||
registerWithTitleHtml={0}
|
||||
loginTitle=Anmeldung bei {0}
|
||||
loginTitleHtml=Anmeldung bei <strong>{0}</strong>
|
||||
loginTitleHtml={0}
|
||||
loginOauthTitle=
|
||||
loginOauthTitleHtml=Tempor\u00E4rer zugriff auf <strong>{0}</strong> angefordert von <strong>{1}</strong>.
|
||||
loginTotpTitle=Mobile Authentifizierung Einrichten
|
||||
|
@ -32,7 +32,7 @@ impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
|
|||
unknownUser=Unknown user
|
||||
realmChoice=Realm
|
||||
oauthGrantTitle=OAuth gew\u00E4hren
|
||||
oauthGrantTitleHtml=Tempor\u00E4rer zugriff auf <strong>{0}</strong> angefordert von
|
||||
oauthGrantTitleHtml={0}
|
||||
errorTitle=Es tut uns leid...
|
||||
errorTitleHtml=Es tut uns leid...
|
||||
emailVerifyTitle=E-Mail verifizieren
|
||||
|
|
|
@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos Not Configured
|
|||
bypassKerberosDetail=Either you are not logged in via Kerberos or your browser is not set up for Kerberos login. Please click continue to login in through other means
|
||||
kerberosNotSetUp=Kerberos is not set up. You cannot login.
|
||||
registerWithTitle=Register with {0}
|
||||
registerWithTitleHtml=Register with <strong>{0}</strong>
|
||||
registerWithTitleHtml={0}
|
||||
loginTitle=Log in to {0}
|
||||
loginTitleHtml=Log in to <strong>{0}</strong>
|
||||
loginTitleHtml={0}
|
||||
impersonateTitle={0} Impersonate User
|
||||
impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
|
||||
realmChoice=Realm
|
||||
|
@ -25,8 +25,8 @@ unknownUser=Unknown user
|
|||
loginTotpTitle=Mobile Authenticator Setup
|
||||
loginProfileTitle=Update Account Information
|
||||
loginTimeout=You took too long to login. Login process starting from beginning.
|
||||
oauthGrantTitle=OAuth Grant
|
||||
oauthGrantTitleHtml=Temporary access for <strong>{0}</strong> requested by
|
||||
oauthGrantTitle=Grant Access
|
||||
oauthGrantTitleHtml={0}
|
||||
errorTitle=We''re sorry...
|
||||
errorTitleHtml=We''re <strong>sorry</strong> ...
|
||||
emailVerifyTitle=Email verification
|
||||
|
|
|
@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos no configurado
|
|||
bypassKerberosDetail=O bien no est\u00E1s identificado mediante Kerberos o tu navegador no est\u00E1 configurado para identificarse mediante Kerberos. Por favor haz clic para identificarte por otro medio.
|
||||
kerberosNotSetUp=Kerberos no est\u00E1 configurado. No puedes identificarte.
|
||||
registerWithTitle=Reg\u00EDstrate con {0}
|
||||
registerWithTitleHtml=Reg\u00EDstrate con <strong>{0}</strong>
|
||||
registerWithTitleHtml={0}
|
||||
loginTitle=Inicia sesi\u00F3n en {0}
|
||||
loginTitleHtml=Inicia sesi\u00F3n en {0}
|
||||
loginTitleHtml={0}
|
||||
impersonateTitle={0}\u00A0Personificar Usuario
|
||||
impersonateTitleHtml=<strong>{0}</strong> Personificar Usuario</strong>
|
||||
realmChoice=Dominio
|
||||
|
@ -26,7 +26,7 @@ loginTotpTitle=Configura tu aplicaci\u00F3n de identificaci\u00F3n m\u00F3vil
|
|||
loginProfileTitle=Actualiza la informaci\u00F3n de tu cuenta
|
||||
loginTimeout=Has tardado demasiado en identificarte. Inicia de nuevo la identificaci\u00F3n.
|
||||
oauthGrantTitle=Concesi\u00F3n OAuth
|
||||
oauthGrantTitleHtml=Acceso temporal para <strong>{0}</strong> solicitado por
|
||||
oauthGrantTitleHtml={0}
|
||||
errorTitle=Lo sentimos...
|
||||
errorTitleHtml=Lo <strong>sentimos</strong>...
|
||||
emailVerifyTitle=Verificaci\u00F3n del email
|
||||
|
|
|
@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos non configur\u00e9
|
|||
bypassKerberosDetail=Si vous n''\u00eates pas connect\u00e9 via Kerberos ou bien que votre navigateur n''est pas configur\u00e9 pour la connexion via Kerberos. Veuillez cliquer pour vous connecter via un autre moyen.
|
||||
kerberosNotSetUp=Kerberos n''est pas configur\u00e9. Connexion impossible.
|
||||
registerWithTitle=Enregistrement avec {0}
|
||||
registerWithTitleHtml=Enregistrement avec <strong>{0}</strong>
|
||||
registerWithTitleHtml={0}
|
||||
loginTitle=Se connecter \u00e0 {0}
|
||||
loginTitleHtml=Se connecter \u00e0 <strong>{0}</strong>
|
||||
loginTitleHtml={0}
|
||||
impersonateTitle={0} utilisateur impersonate
|
||||
impersonateTitleHtml=<strong>{0}</strong> utilisateur impersonate</strong>
|
||||
realmChoice=Domaine
|
||||
|
@ -26,7 +26,7 @@ loginTotpTitle=Configuration de l''authentification par mobile
|
|||
loginProfileTitle=Mise \u00e0 jour du compte
|
||||
loginTimeout=Le temps imparti pour la connexion est \u00e9coul\u00e9. Le processus de connexion red\u00e9marre depuis le d\u00e9but.
|
||||
oauthGrantTitle=OAuth Grant
|
||||
oauthGrantTitleHtml=Acc\u00e8s temporaire pour <strong>{0}</strong> demand\u00e9 par
|
||||
oauthGrantTitleHtml={0}
|
||||
errorTitle=Nous sommes d\u00e9sol\u00e9 ...
|
||||
errorTitleHtml=Nous sommes <strong>d\u00e9sol\u00e9</strong> ...
|
||||
emailVerifyTitle=V\u00e9rification du courriel
|
||||
|
|
|
@ -19,9 +19,9 @@ recaptchaNotConfigured=Recaptcha is required, but not configured
|
|||
consentDenied=Consent denied.
|
||||
|
||||
registerWithTitle=Registrati come {0}
|
||||
registerWithTitleHtml=Registrati come <strong>{0}</strong>
|
||||
registerWithTitleHtml={0}
|
||||
loginTitle=Accedi a {0}
|
||||
loginTitleHtml=Accedi a <strong>{0}</strong>
|
||||
loginTitleHtml={0}
|
||||
loginTotpTitle=Configura Autenticazione Mobile
|
||||
loginProfileTitle=Aggiorna Profilo
|
||||
loginTimeout=You took too long to login. Login process starting from beginning.
|
||||
|
@ -30,7 +30,7 @@ impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
|
|||
unknownUser=Unknown user
|
||||
realmChoice=Realm
|
||||
oauthGrantTitle=OAuth Grant
|
||||
oauthGrantTitleHtml=Accesso temporaneo per <strong>{0}</strong> richiesto da
|
||||
oauthGrantTitleHtml={0}
|
||||
errorTitle=Siamo spiacenti...
|
||||
errorTitleHtml=Siamo <strong>spiacenti</strong> ...
|
||||
emailVerifyTitle=Verifica Email
|
||||
|
|
|
@ -15,9 +15,9 @@ kerberosNotConfiguredTitle=Kerberos N\u00E3o Configurado
|
|||
bypassKerberosDetail=Ou voc\u00EA n\u00E3o est\u00E1 logado via Kerberos ou o seu navegador n\u00E3o est\u00E1 configurado para login Kerberos. Por favor, clique em continuar para fazer o login no atrav\u00E9s de outros meios
|
||||
kerberosNotSetUp=Kerberos n\u00E3o est\u00E1 configurado. Voc\u00EA n\u00E3o pode acessar.
|
||||
registerWithTitle=Registre-se com {0}
|
||||
registerWithTitleHtml=Registre-se com <strong>{0}</strong>
|
||||
registerWithTitleHtml={0}
|
||||
loginTitle=Entrar em {0}
|
||||
loginTitleHtml=Entrar em <strong>{0}</strong>
|
||||
loginTitleHtml={0}
|
||||
impersonateTitle={0} Impersonate User
|
||||
impersonateTitleHtml=<strong>{0}</strong> Impersonate User</strong>
|
||||
realmChoice=Realm
|
||||
|
@ -26,7 +26,7 @@ loginTotpTitle=Configura\u00E7\u00E3o do autenticador mobile
|
|||
loginProfileTitle=Atualiza\u00E7\u00E3o das Informa\u00E7\u00F5es da Conta
|
||||
loginTimeout=Voc\u00EA demorou muito para entrar. Por favor, refa\u00E7a o processo de login a partir do in\u00EDcio.
|
||||
oauthGrantTitle=Concess\u00E3o OAuth
|
||||
oauthGrantTitleHtml=Acesso tempor\u00E1rio para <strong>{0}</strong> solicitado pela
|
||||
oauthGrantTitleHtml={0}
|
||||
errorTitle=N\u00F3s lamentamos...
|
||||
errorTitleHtml=N\u00F3s <strong>lamentamos</strong> ...
|
||||
emailVerifyTitle=Verifica\u00E7\u00E3o de e-mail
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<#import "template.ftl" as layout>
|
||||
<@layout.registrationLayout; section>
|
||||
<#if section = "title">
|
||||
${msg("registerWithTitle",(realm.name!''))}
|
||||
${msg("registerWithTitle",(realm.displayName!''))}
|
||||
<#elseif section = "header">
|
||||
${msg("registerWithTitleHtml",(realm.name!''))}
|
||||
${msg("registerWithTitleHtml",(realm.displayNameHtml!''))}
|
||||
<#elseif section = "form">
|
||||
<form id="kc-register-form" class="${properties.kcFormClass!}" action="${url.registrationAction}" method="post">
|
||||
<#if !realm.registrationEmailAsUsername>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</head>
|
||||
|
||||
<body class="${properties.kcBodyClass!}">
|
||||
<div id="kc-logo"><div id="kc-logo-wrapper"></div></div>
|
||||
<div id="kc-logo"><a href="${properties.kcLogoLink!'#'}"><div id="kc-logo-wrapper"></div></a></div>
|
||||
|
||||
<div id="kc-container" class="${properties.kcContainerClass!}">
|
||||
<div id="kc-container-wrapper" class="${properties.kcContainerWrapperClass!}">
|
||||
|
|
|
@ -74,11 +74,12 @@
|
|||
#kc-logo-wrapper {
|
||||
background-image: url("../img/keycloak-logo.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: top right;
|
||||
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 50px;
|
||||
height: 37px;
|
||||
|
||||
margin: 50px;
|
||||
width: 154px;
|
||||
}
|
||||
|
||||
#kc-header {
|
||||
|
@ -281,8 +282,8 @@ ol#kc-totp-settings li:first-of-type {
|
|||
|
||||
@media (max-width: 767px) {
|
||||
#kc-logo-wrapper {
|
||||
margin-top: 30px;
|
||||
margin-right: 15px;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
#kc-header {
|
||||
|
|
|
@ -6,6 +6,8 @@ meta=viewport==width=device-width,initial-scale=1
|
|||
|
||||
kcHtmlClass=login-pf
|
||||
|
||||
kcLogoLink=http://www.keycloak.org
|
||||
|
||||
kcContentClass=col-sm-12 col-md-12 col-lg-12 container
|
||||
kcContentWrapperClass=row
|
||||
|
||||
|
|
|
@ -42,6 +42,24 @@ public class RealmBean {
|
|||
return realm.getName();
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
String displayName = realm.getDisplayName();
|
||||
if (displayName != null && displayName.length() > 0) {
|
||||
return displayName;
|
||||
} else {
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
|
||||
public String getDisplayNameHtml() {
|
||||
String displayNameHtml = realm.getDisplayNameHtml();
|
||||
if (displayNameHtml != null && displayNameHtml.length() > 0) {
|
||||
return displayNameHtml;
|
||||
} else {
|
||||
return getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isIdentityFederationEnabled() {
|
||||
return realm.isIdentityFederationEnabled();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,14 @@ public interface RealmModel extends RoleContainerModel {
|
|||
|
||||
void setName(String name);
|
||||
|
||||
String getDisplayName();
|
||||
|
||||
void setDisplayName(String displayName);
|
||||
|
||||
String getDisplayNameHtml();
|
||||
|
||||
void setDisplayNameHtml(String displayNameHtml);
|
||||
|
||||
boolean isEnabled();
|
||||
|
||||
void setEnabled(boolean enabled);
|
||||
|
|
|
@ -11,6 +11,8 @@ import java.util.Map;
|
|||
public class RealmEntity extends AbstractIdentifiableEntity {
|
||||
|
||||
private String name;
|
||||
private String displayName;
|
||||
private String displayNameHtml;
|
||||
private boolean enabled;
|
||||
private String sslRequired;
|
||||
private boolean registrationAllowed;
|
||||
|
@ -105,6 +107,22 @@ public class RealmEntity extends AbstractIdentifiableEntity {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getDisplayNameHtml() {
|
||||
return displayNameHtml;
|
||||
}
|
||||
|
||||
public void setDisplayNameHtml(String displayNameHtml) {
|
||||
this.displayNameHtml = displayNameHtml;
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
|
|
@ -164,6 +164,8 @@ public class ModelToRepresentation {
|
|||
RealmRepresentation rep = new RealmRepresentation();
|
||||
rep.setId(realm.getId());
|
||||
rep.setRealm(realm.getName());
|
||||
rep.setDisplayName(realm.getDisplayName());
|
||||
rep.setDisplayNameHtml(realm.getDisplayNameHtml());
|
||||
rep.setEnabled(realm.isEnabled());
|
||||
rep.setNotBefore(realm.getNotBefore());
|
||||
rep.setSslRequired(realm.getSslRequired().name().toLowerCase());
|
||||
|
|
|
@ -85,6 +85,8 @@ public class RepresentationToModel {
|
|||
convertDeprecatedApplications(session, rep);
|
||||
|
||||
newRealm.setName(rep.getRealm());
|
||||
if (rep.getDisplayName() != null) newRealm.setDisplayName(rep.getDisplayName());
|
||||
if (rep.getDisplayNameHtml() != null) newRealm.setDisplayNameHtml(rep.getDisplayNameHtml());
|
||||
if (rep.isEnabled() != null) newRealm.setEnabled(rep.isEnabled());
|
||||
if (rep.isBruteForceProtected() != null) newRealm.setBruteForceProtected(rep.isBruteForceProtected());
|
||||
if (rep.getMaxFailureWaitSeconds() != null) newRealm.setMaxFailureWaitSeconds(rep.getMaxFailureWaitSeconds());
|
||||
|
@ -595,6 +597,8 @@ public class RepresentationToModel {
|
|||
if (rep.getRealm() != null) {
|
||||
realm.setName(rep.getRealm());
|
||||
}
|
||||
if (rep.getDisplayName() != null) realm.setDisplayName(rep.getDisplayName());
|
||||
if (rep.getDisplayNameHtml() != null) realm.setDisplayNameHtml(rep.getDisplayNameHtml());
|
||||
if (rep.isEnabled() != null) realm.setEnabled(rep.isEnabled());
|
||||
if (rep.isBruteForceProtected() != null) realm.setBruteForceProtected(rep.isBruteForceProtected());
|
||||
if (rep.getMaxFailureWaitSeconds() != null) realm.setMaxFailureWaitSeconds(rep.getMaxFailureWaitSeconds());
|
||||
|
|
|
@ -59,6 +59,30 @@ public class RealmAdapter implements RealmModel {
|
|||
updated.setName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
if (updated != null) return updated.getDisplayName();
|
||||
return cached.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayName(String displayName) {
|
||||
getDelegateForUpdate();
|
||||
updated.setDisplayName(displayName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayNameHtml() {
|
||||
if (updated != null) return updated.getDisplayNameHtml();
|
||||
return cached.getDisplayNameHtml();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayNameHtml(String displayNameHtml) {
|
||||
getDelegateForUpdate();
|
||||
updated.setDisplayNameHtml(displayNameHtml);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
if (updated != null) return updated.isEnabled();
|
||||
|
|
|
@ -38,6 +38,8 @@ public class CachedRealm implements Serializable {
|
|||
|
||||
private String id;
|
||||
private String name;
|
||||
private String displayName;
|
||||
private String displayNameHtml;
|
||||
private boolean enabled;
|
||||
private SslRequired sslRequired;
|
||||
private boolean registrationAllowed;
|
||||
|
@ -125,6 +127,8 @@ public class CachedRealm implements Serializable {
|
|||
public CachedRealm(RealmCache cache, RealmProvider delegate, RealmModel model) {
|
||||
id = model.getId();
|
||||
name = model.getName();
|
||||
displayName = model.getDisplayName();
|
||||
displayNameHtml = model.getDisplayNameHtml();
|
||||
enabled = model.isEnabled();
|
||||
sslRequired = model.getSslRequired();
|
||||
registrationAllowed = model.isRegistrationAllowed();
|
||||
|
@ -265,6 +269,14 @@ public class CachedRealm implements Serializable {
|
|||
return name;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public String getDisplayNameHtml() {
|
||||
return displayNameHtml;
|
||||
}
|
||||
|
||||
public List<String> getDefaultRoles() {
|
||||
return defaultRoles;
|
||||
}
|
||||
|
|
|
@ -21,21 +21,7 @@ import org.keycloak.models.RoleModel;
|
|||
import org.keycloak.models.UserFederationMapperModel;
|
||||
import org.keycloak.models.UserFederationProviderCreationEventImpl;
|
||||
import org.keycloak.models.UserFederationProviderModel;
|
||||
import org.keycloak.models.jpa.entities.AuthenticationExecutionEntity;
|
||||
import org.keycloak.models.jpa.entities.AuthenticationFlowEntity;
|
||||
import org.keycloak.models.jpa.entities.AuthenticatorConfigEntity;
|
||||
import org.keycloak.models.jpa.entities.ClientEntity;
|
||||
import org.keycloak.models.jpa.entities.ClientTemplateEntity;
|
||||
import org.keycloak.models.jpa.entities.GroupEntity;
|
||||
import org.keycloak.models.jpa.entities.IdentityProviderEntity;
|
||||
import org.keycloak.models.jpa.entities.IdentityProviderMapperEntity;
|
||||
import org.keycloak.models.jpa.entities.RealmAttributeEntity;
|
||||
import org.keycloak.models.jpa.entities.RealmEntity;
|
||||
import org.keycloak.models.jpa.entities.RequiredActionProviderEntity;
|
||||
import org.keycloak.models.jpa.entities.RequiredCredentialEntity;
|
||||
import org.keycloak.models.jpa.entities.RoleEntity;
|
||||
import org.keycloak.models.jpa.entities.UserFederationMapperEntity;
|
||||
import org.keycloak.models.jpa.entities.UserFederationProviderEntity;
|
||||
import org.keycloak.models.jpa.entities.*;
|
||||
import org.keycloak.models.utils.KeycloakModelUtils;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
|
@ -98,6 +84,26 @@ public class RealmAdapter implements RealmModel {
|
|||
em.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return getAttribute(RealmAttributes.DISPLAY_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayName(String displayName) {
|
||||
setAttribute(RealmAttributes.DISPLAY_NAME, displayName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayNameHtml() {
|
||||
return getAttribute(RealmAttributes.DISPLAY_NAME_HTML);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayNameHtml(String displayNameHtml) {
|
||||
setAttribute(RealmAttributes.DISPLAY_NAME_HTML, displayNameHtml);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return realm.isEnabled();
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package org.keycloak.models.jpa.entities;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
|
||||
*/
|
||||
public interface RealmAttributes {
|
||||
|
||||
String DISPLAY_NAME = "displayName";
|
||||
|
||||
String DISPLAY_NAME_HTML = "displayNameHtml";
|
||||
|
||||
}
|
|
@ -97,6 +97,28 @@ public class RealmAdapter extends AbstractMongoAdapter<MongoRealmEntity> impleme
|
|||
updateRealm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return realm.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayName(String displayName) {
|
||||
realm.setDisplayName(displayName);
|
||||
updateRealm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayNameHtml() {
|
||||
return realm.getDisplayNameHtml();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDisplayNameHtml(String displayNameHtml) {
|
||||
realm.setDisplayNameHtml(displayNameHtml);
|
||||
updateRealm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return realm.isEnabled();
|
||||
|
|
1
pom.xml
1
pom.xml
|
@ -19,6 +19,7 @@
|
|||
|
||||
<properties>
|
||||
<product.name>Keycloak</product.name>
|
||||
<product.name-html>\u003Cstrong\u003EKeycloak\u003C\u002Fstrong\u003E</product.name-html>
|
||||
<product.version>${project.version}</product.version>
|
||||
<product.build-time>${timestamp}</product.build-time>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.keycloak.services.managers;
|
|||
|
||||
import org.jboss.logging.Logger;
|
||||
import org.keycloak.Config;
|
||||
import org.keycloak.common.Version;
|
||||
import org.keycloak.common.enums.SslRequired;
|
||||
import org.keycloak.models.AdminRoles;
|
||||
import org.keycloak.models.ClientModel;
|
||||
|
@ -39,6 +40,8 @@ public class ApplianceBootstrap {
|
|||
manager.setContextPath(contextPath);
|
||||
RealmModel realm = manager.createRealm(adminRealmName, adminRealmName);
|
||||
realm.setName(adminRealmName);
|
||||
realm.setDisplayName(Version.NAME);
|
||||
realm.setDisplayNameHtml(Version.NAME_HTML);
|
||||
realm.setEnabled(true);
|
||||
realm.addRequiredCredential(CredentialRepresentation.PASSWORD);
|
||||
realm.setSsoSessionIdleTimeout(1800);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class OAuthGrantPage extends AbstractPage {
|
|||
|
||||
@Override
|
||||
public boolean isCurrent() {
|
||||
return driver.getTitle().equals("OAuth Grant");
|
||||
return driver.getTitle().equals("Grant Access");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue