Merge pull request #1072 from gerbermichi/i18n
[KEYCLOAK-301] Internationalization support (3rd pr)
This commit is contained in:
commit
acef322ea3
24 changed files with 264 additions and 131 deletions
|
@ -0,0 +1,36 @@
|
|||
package org.keycloak.freemarker.beans;
|
||||
|
||||
import freemarker.template.TemplateMethodModelEx;
|
||||
import freemarker.template.TemplateModelException;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:gerbermichi@me.com">Michael Gerber</a>
|
||||
*/
|
||||
public class AdvancedMessageFormatterMethod implements TemplateMethodModelEx {
|
||||
private final Properties messages;
|
||||
private final Locale locale;
|
||||
|
||||
public AdvancedMessageFormatterMethod(Locale locale, Properties messages) {
|
||||
this.locale = locale;
|
||||
this.messages = messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object exec(List list) throws TemplateModelException {
|
||||
if (list.size() >= 1) {
|
||||
String key = list.get(0).toString();
|
||||
if (key.startsWith("${") && key.endsWith("}")) {
|
||||
key = key.substring(2, key.length() - 1);
|
||||
return new MessageFormat(messages.getProperty(key, key), locale).format(list.subList(1, list.size()).toArray());
|
||||
} else {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -22,8 +22,8 @@ public class MessageFormatterMethod implements TemplateMethodModelEx {
|
|||
|
||||
@Override
|
||||
public Object exec(List list) throws TemplateModelException {
|
||||
String key = list.get(0).toString();
|
||||
if (list.size() >= 1) {
|
||||
String key = list.get(0).toString();
|
||||
return new MessageFormat(messages.getProperty(key,key),locale).format(list.subList(1, list.size()).toArray());
|
||||
} else {
|
||||
return null;
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<h2>Edit Account</h2>
|
||||
<h2>${msg("editAccountHtmlTtile")}</h2>
|
||||
</div>
|
||||
<div class="col-md-2 subtitle">
|
||||
<span class="subtitle"><span class="required">*</span> Required fields</span>
|
||||
<span class="subtitle"><span class="required">*</span> ${msg("requiredFields")}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -104,9 +104,9 @@
|
|||
<div class="form-group">
|
||||
<div id="kc-form-buttons" class="col-md-offset-2 col-md-10 submit">
|
||||
<div class="">
|
||||
<#if url.referrerURI??><a href="${url.referrerURI}">Back to application</a></#if>
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="submitAction" value="Save">Save</button>
|
||||
<button type="submit" class="btn btn-default btn-lg" name="submitAction" value="Cancel">Cancel</button>
|
||||
<#if url.referrerURI??><a href="${url.referrerURI}">${msg("backToApplication")}/a></#if>
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="submitAction" value="Save">${msg("doSave")}</button>
|
||||
<button type="submit" class="btn btn-default btn-lg" name="submitAction" value="Cancel">${msg("doCancel")}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<h2>Federated Identities</h2>
|
||||
<h2>${msg("federatedIdentitiesHtmlTitle")}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -19,10 +19,10 @@
|
|||
<div class="col-sm-5 col-md-5">
|
||||
<#if identity.connected>
|
||||
<#if federatedIdentity.removeLinkPossible>
|
||||
<a href="${identity.actionUrl}" type="submit" id="remove-${identity.providerId!}" class="btn btn-primary btn-lg">Remove ${identity.providerName!}</a>
|
||||
<a href="${identity.actionUrl}" type="submit" id="remove-${identity.providerId!}" class="btn btn-primary btn-lg">${msg("doRemove")}</a>
|
||||
</#if>
|
||||
<#else>
|
||||
<a href="${identity.actionUrl}" type="submit" id="add-${identity.providerId!}" class="btn btn-primary btn-lg">Add ${identity.providerName!}</a>
|
||||
<a href="${identity.actionUrl}" type="submit" id="add-${identity.providerId!}" class="btn btn-primary btn-lg">${msg("doAdd")}</a>
|
||||
</#if>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,18 +3,18 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<h2>Account Log</h2>
|
||||
<h2>${msg("accountLogHtmlTitle")}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Event</td>
|
||||
<td>IP</td>
|
||||
<td>Client</td>
|
||||
<td>Details</td>
|
||||
<td>${msg("date")}</td>
|
||||
<td>${msg("event")}</td>
|
||||
<td>${msg("ip")}</td>
|
||||
<td>${msg("client")}</td>
|
||||
<td>${msg("details")}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
|
|
@ -1,9 +1,24 @@
|
|||
doLogOutAllSessions=Alle Sessionen abmelden
|
||||
doSave=Speichern
|
||||
doCancel=Abbrechen
|
||||
doRemove=Entfernen
|
||||
doAdd=Hinzufügen
|
||||
doSignOut=Abmelden
|
||||
|
||||
editAccountHtmlTtile=Benutzerkonto Bearbeiten
|
||||
federatedIdentitiesHtmlTitle=Federated Identities
|
||||
accountLogHtmlTitle=Benutzerkonto Log
|
||||
changePasswordHtmlTitle=Passwort Ändern
|
||||
sessionsHtmlTitle=Sessions
|
||||
accountManagementTitle=Keycloak Benutzerkontoverwaltung
|
||||
authenticatorTitle=Authenticator
|
||||
|
||||
authenticatorCode=One-time code
|
||||
email=E-Mail
|
||||
firstName=Vorname
|
||||
lastName=Nachname
|
||||
password=Passwort
|
||||
passwordConfirm=Passwort bestätigung
|
||||
passwordConfirm=Passwortbestätigung
|
||||
passwordNew=Neues Passwort
|
||||
username=Benutzernamen
|
||||
street=Strasse
|
||||
|
@ -12,6 +27,36 @@ postal_code=PLZ
|
|||
locality=Stadt oder Ortschaft
|
||||
country=Land
|
||||
|
||||
requiredFields=Erforderliche Felder
|
||||
allFieldsRequired=Alle Felder sind Erforderlich
|
||||
|
||||
backToApplication=« Zurück zur Applikation
|
||||
backTo=Zurück zu {0}
|
||||
|
||||
date=Datum
|
||||
event=Ereignis
|
||||
ip=IP
|
||||
client=Client
|
||||
clients=Clients
|
||||
details=Details
|
||||
started=Startdatum
|
||||
lastAccess=Letzter Zugriff
|
||||
expires=Ablaufdatum
|
||||
applications=
|
||||
|
||||
account=Benutzerkonto
|
||||
federatedIdentity=Federated Identity
|
||||
authenticator=Authenticator
|
||||
sessions=Sessions
|
||||
log=Log
|
||||
|
||||
configureAuthenticators=Authenticators konfigurieren
|
||||
mobile=Mobile
|
||||
totpStep1=Installieren Sie <a href="https://fedorahosted.org/freeotp/" target="_blank">FreeOTP</a> oder <a href="http://code.google.com/p/google-authenticator/" target="_blank">Google Authenticator</a> auf Ihrem Smartphone.
|
||||
totpStep2=Öffnen Sie die Applikation und scannen Sie den Barcode oder geben sie den Code ein.
|
||||
totpStep3=Geben Sie den One-time Code welcher die Applikation generiert hat ein und klicken Sie auf Speichern.
|
||||
|
||||
|
||||
missingFirstNameMessage=Bitte geben Sie einen Vornamen ein.
|
||||
missingEmailMessage=Bitte geben Sie eine E-Mail Adresse ein.
|
||||
missingLastNameMessage=Bitte geben Sie einen Nachnamen ein.
|
||||
|
@ -20,7 +65,7 @@ notMatchPasswordMessage=Passw
|
|||
|
||||
missingTotpMessage=Bitte geben Sie den One-time Code ein.
|
||||
invalidPasswordExistingMessage=Das aktuelle Passwort is ungültig.
|
||||
invalidPasswordConfirmMessage=Die Passwort bestätigung ist nicht identisch.
|
||||
invalidPasswordConfirmMessage=Die Passwortbestätigung ist nicht identisch.
|
||||
invalidTotpMessage=Ungültiger One-time Code.
|
||||
invalidEmailMessage=Ungültige E-Mail Adresse.
|
||||
|
||||
|
@ -37,15 +82,13 @@ missingIdentityProviderMessage=Identity Provider nicht angegeben.
|
|||
invalidFederatedIdentityActionMessage=Ungültige oder fehlende Aktion.
|
||||
identityProviderNotFoundMessage=Angegebener Identity Provider nicht gefunden.
|
||||
federatedIdentityLinkNotActiveMessage=Diese Identität ist nicht mehr aktiv.
|
||||
federatedIdentityRemovingLastProviderMessage=Sie können den letzen Eintrag nicht enfernen, da Sie kein Passwort haben.
|
||||
identityProviderRedirectErrorMessage=Fehler bei der Weiterleitung zum Identity Proivder.
|
||||
federatedIdentityRemovingLastProviderMessage=Sie können den letzen Eintrag nicht entfernen, da Sie kein Passwort haben.
|
||||
identityProviderRedirectErrorMessage=Fehler bei der Weiterleitung zum Identity Provider.
|
||||
identityProviderRemovedMessage=Identity Provider erfolgreich entfernt.
|
||||
|
||||
accountDisabledMessage=Benutzerkonto ist gesperrt, bitte kontaktieren Sie den Admin.
|
||||
|
||||
doLogOutAllSessions=Alle Sessionen abmelden
|
||||
|
||||
accountTemporarilyDisabledMessage=Benutzerkonto ist temporär gespert, bitte kontaktieren Sie den Admin oder versuchen Sie es später nocheinmal.
|
||||
accountTemporarilyDisabledMessage=Benutzerkonto ist temporär gesperrt, bitte kontaktieren Sie den Admin oder versuchen Sie es später noch einmal.
|
||||
invalidPasswordMinLengthMessage=Ungültiges Passwort: minimum länge {0}.
|
||||
invalidPasswordMinDigitsMessage=Ungültiges Passwort: muss mindestens {0} Zahl(en) beinhalten.
|
||||
invalidPasswordMinLowerCaseCharsMessage=Ungültiges Passwort: muss mindestens {0} Kleinbuchstaben beinhalten.
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
doSave=Save
|
||||
doCancel=Cancel
|
||||
doLogOutAllSessions=Log out all sessions
|
||||
doRemove=Remove
|
||||
doAdd=Add
|
||||
doSignOut=Sign Out
|
||||
|
||||
editAccountHtmlTtile=Edit Account
|
||||
federatedIdentitiesHtmlTitle=Federated Identities
|
||||
accountLogHtmlTitle=Account Log
|
||||
changePasswordHtmlTitle=Change Password
|
||||
sessionsHtmlTitle=Sessions
|
||||
accountManagementTitle=Keycloak Account Management
|
||||
authenticatorTitle=Authenticator
|
||||
|
||||
authenticatorCode=One-time code
|
||||
email=Email
|
||||
firstName=First name
|
||||
|
@ -12,6 +27,35 @@ region=State, Province, or Region
|
|||
postal_code=Zip or Postal code
|
||||
country=Country
|
||||
|
||||
requiredFields=Required fields
|
||||
allFieldsRequired=All fields required
|
||||
|
||||
backToApplication=« Back to application
|
||||
backTo=Back to {0}
|
||||
|
||||
date=Date
|
||||
event=Event
|
||||
ip=IP
|
||||
client=Client
|
||||
clients=Clients
|
||||
details=Details
|
||||
started=Started
|
||||
lastAccess=Last Access
|
||||
expires=Expires
|
||||
applications=Applications
|
||||
|
||||
account=Account
|
||||
federatedIdentity=Federated Identity
|
||||
authenticator=Authenticator
|
||||
sessions=Sessions
|
||||
log=Log
|
||||
|
||||
configureAuthenticators=Configured Authenticators
|
||||
mobile=Mobile
|
||||
totpStep1=Install <a href="https://fedorahosted.org/freeotp/" target="_blank">FreeOTP</a> or <a href="http://code.google.com/p/google-authenticator/" target="_blank">Google Authenticator</a> on your mobile.
|
||||
totpStep2=Open the application and scan the barcode or enter the key.
|
||||
totpStep3=Enter the one-time code provided by the application and click Save to finish the setup.
|
||||
|
||||
missingFirstNameMessage=Please specify first name.
|
||||
invalidEmailMessage=Invalid email address.
|
||||
missingLastNameMessage=Please specify last name.
|
||||
|
@ -19,39 +63,37 @@ missingEmailMessage=Please specify email.
|
|||
missingPasswordMessage=Please specify password.
|
||||
notMatchPasswordMessage=Passwords don''t match.
|
||||
|
||||
missingTotpMessage=Please specify authenticator code
|
||||
invalidPasswordExistingMessage=Invalid existing password
|
||||
invalidPasswordConfirmMessage=Password confirmation doesn''t match
|
||||
invalidTotpMessage=Invalid authenticator code
|
||||
missingTotpMessage=Please specify authenticator code.
|
||||
invalidPasswordExistingMessage=Invalid existing password.
|
||||
invalidPasswordConfirmMessage=Password confirmation doesn''t match.
|
||||
invalidTotpMessage=Invalid authenticator code.
|
||||
|
||||
readOnlyUserMessage=You can''t update your account as it is read only
|
||||
readOnlyPasswordMessage=You can''t update your password as your account is read only
|
||||
readOnlyUserMessage=You can''t update your account as it is read only.
|
||||
readOnlyPasswordMessage=You can''t update your password as your account is read only.
|
||||
|
||||
successTotpMessage=Mobile authenticator configured.
|
||||
successTotpRemovedMessage=Mobile authenticator removed.
|
||||
|
||||
accountUpdatedMessage=Your account has been updated
|
||||
accountPasswordUpdatedMessage=Your password has been updated
|
||||
accountUpdatedMessage=Your account has been updated.
|
||||
accountPasswordUpdatedMessage=Your password has been updated.
|
||||
|
||||
missingIdentityProviderMessage=Identity provider not specified
|
||||
invalidFederatedIdentityActionMessage=Invalid or missing action
|
||||
identityProviderNotFoundMessage=Specified identity provider not found
|
||||
federatedIdentityLinkNotActiveMessage=This identity is not active anymore
|
||||
federatedIdentityRemovingLastProviderMessage=You can''t remove last federated identity as you don''t have password
|
||||
identityProviderRedirectErrorMessage=Failed to redirect to identity provider
|
||||
identityProviderRemovedMessage=Identity provider removed successfully
|
||||
missingIdentityProviderMessage=Identity provider not specified.
|
||||
invalidFederatedIdentityActionMessage=Invalid or missing action.
|
||||
identityProviderNotFoundMessage=Specified identity provider not found.
|
||||
federatedIdentityLinkNotActiveMessage=This identity is not active anymore.
|
||||
federatedIdentityRemovingLastProviderMessage=You can''t remove last federated identity as you don''t have password.
|
||||
identityProviderRedirectErrorMessage=Failed to redirect to identity provider.
|
||||
identityProviderRemovedMessage=Identity provider removed successfully.
|
||||
|
||||
accountDisabledMessage=Account is disabled, contact admin
|
||||
accountDisabledMessage=Account is disabled, contact admin.
|
||||
|
||||
doLogOutAllSessions=Log out all sessions
|
||||
|
||||
accountTemporarilyDisabledMessage=Account is temporarily disabled, contact admin or try again later
|
||||
invalidPasswordMinLengthMessage=Invalid password: minimum length {0}
|
||||
invalidPasswordMinLowerCaseCharsMessage=Invalid password: must contain at least {0} lower case characters
|
||||
invalidPasswordMinDigitsMessage=Invalid password: must contain at least {0} numerical digits
|
||||
invalidPasswordMinUpperCaseCharsMessage=Invalid password: must contain at least {0} upper case characters
|
||||
invalidPasswordMinSpecialCharsMessage=Invalid password: must contain at least {0} special characters
|
||||
invalidPasswordNotUsernameMessage=Invalid password\: must not be equal to the username
|
||||
accountTemporarilyDisabledMessage=Account is temporarily disabled, contact admin or try again later.
|
||||
invalidPasswordMinLengthMessage=Invalid password: minimum length {0}.
|
||||
invalidPasswordMinLowerCaseCharsMessage=Invalid password: must contain at least {0} lower case characters.
|
||||
invalidPasswordMinDigitsMessage=Invalid password: must contain at least {0} numerical digits.
|
||||
invalidPasswordMinUpperCaseCharsMessage=Invalid password: must contain at least {0} upper case characters.
|
||||
invalidPasswordMinSpecialCharsMessage=Invalid password: must contain at least {0} special characters.
|
||||
invalidPasswordNotUsernameMessage=Invalid password\: must not be equal to the username.
|
||||
|
||||
locale_de=German
|
||||
locale_en=English
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<h2>Change Password</h2>
|
||||
<h2>${msg("changePasswordHtmlTitle")}</h2>
|
||||
</div>
|
||||
<div class="col-md-2 subtitle">
|
||||
<span class="subtitle">All fields required</span>
|
||||
<span class="subtitle">${msg("allFieldsRequired")}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -48,8 +48,8 @@
|
|||
<div class="form-group">
|
||||
<div id="kc-form-buttons" class="col-md-offset-2 col-md-10 submit">
|
||||
<div class="">
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="submitAction" value="Save">Save</button>
|
||||
<button type="submit" class="btn btn-default btn-lg" name="submitAction" value="Cancel">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="submitAction" value="Save">${msg("doSave")}</button>
|
||||
<button type="submit" class="btn btn-default btn-lg" name="submitAction" value="Cancel">${msg("doCancel")}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<h2>Sessions</h2>
|
||||
<h2>${msg("sessionsHtmlTitle")}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>IP</td>
|
||||
<td>Started</td>
|
||||
<td>Last Access</td>
|
||||
<td>Expires</td>
|
||||
<td>Applications</td>
|
||||
<td>Clients</td>
|
||||
<td>${msg("ip")}</td>
|
||||
<td>${msg("started")}</td>
|
||||
<td>${msg("lastAccess")}</td>
|
||||
<td>${msg("expires")}</td>
|
||||
<td>${msg("applications")}</td>
|
||||
<td>${msg("clients")}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Keycloak Account Management</title>
|
||||
<title>${msg("accountManagementTitle")}</title>
|
||||
<link rel="icon" href="${url.resourcesPath}/img/favicon.ico">
|
||||
<#if properties.styles?has_content>
|
||||
<#list properties.styles?split(' ') as style>
|
||||
|
@ -40,8 +40,8 @@
|
|||
</div>
|
||||
<li>
|
||||
</#if>
|
||||
<#if referrer?has_content && referrer.url?has_content><li><a href="${referrer.url}" id="referrer">Back to ${referrer.name}</a></li></#if>
|
||||
<li><a href="${url.logoutUrl}">Sign Out</a></li>
|
||||
<#if referrer?has_content && referrer.url?has_content><li><a href="${referrer.url}" id="referrer">${msg("backTo",referrer.name)}</a></li></#if>
|
||||
<li><a href="${url.logoutUrl}">${msg("doSignOut")}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -51,12 +51,12 @@
|
|||
<div class="container">
|
||||
<div class="bs-sidebar col-sm-3 ng-scope">
|
||||
<ul>
|
||||
<li class="<#if active=='account'>active</#if>"><a href="${url.accountUrl}">Account</a></li>
|
||||
<#if features.passwordUpdateSupported><li class="<#if active=='password'>active</#if>"><a href="${url.passwordUrl}">Password</a></li></#if>
|
||||
<li class="<#if active=='totp'>active</#if>"><a href="${url.totpUrl}">Authenticator</a></li>
|
||||
<#if features.identityFederation><li class="<#if active=='social'>active</#if>"><a href="${url.socialUrl}">Federated Identity</a></li></#if>
|
||||
<li class="<#if active=='sessions'>active</#if>"><a href="${url.sessionsUrl}">Sessions</a></li>
|
||||
<#if features.log><li class="<#if active=='log'>active</#if>"><a href="${url.logUrl}">Log</a></li></#if>
|
||||
<li class="<#if active=='account'>active</#if>"><a href="${url.accountUrl}">${msg("account")}</a></li>
|
||||
<#if features.passwordUpdateSupported><li class="<#if active=='password'>active</#if>"><a href="${url.passwordUrl}">${msg("password")}</a></li></#if>
|
||||
<li class="<#if active=='totp'>active</#if>"><a href="${url.totpUrl}">${msg("authenticator")}</a></li>
|
||||
<#if features.identityFederation><li class="<#if active=='social'>active</#if>"><a href="${url.socialUrl}">${msg("federatedIdentity")}</a></li></#if>
|
||||
<li class="<#if active=='sessions'>active</#if>"><a href="${url.sessionsUrl}">${msg("sessions")}</a></li>
|
||||
<#if features.log><li class="<#if active=='log'>active</#if>"><a href="${url.logUrl}">${msg("log")}</a></li></#if>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
<@layout.mainLayout active='totp' bodyClass='totp'; section>
|
||||
|
||||
<#if totp.enabled>
|
||||
<h2>Authenticators</h2>
|
||||
<h2>${msg("authenticatorTitle")}</h2>
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead
|
||||
<tr>
|
||||
<th colspan="2">Configured Authenticators</th>
|
||||
<th colspan="2">${msg("configureAuthenticators")}/th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="provider">Mobile</td>
|
||||
<td class="provider">${msg("mobile")}</td>
|
||||
<td class="action">
|
||||
<a id="remove-mobile" href="${url.totpRemoveUrl}"><i class="pficon pficon-delete"></i></a>
|
||||
</td>
|
||||
|
@ -20,23 +20,21 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<#else>
|
||||
<h2>Authenticator</h2>
|
||||
<h2>${msg("authenticatorTitle")}</h2>
|
||||
|
||||
<hr/>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
Install <a href="https://fedorahosted.org/freeotp/" target="_blank">FreeOTP</a> or
|
||||
<a href="http://code.google.com/p/google-authenticator/" target="_blank">Google Authenticator</a>
|
||||
on your mobile
|
||||
<p>${msg("totpStep1")}</p>
|
||||
</li>
|
||||
<li>
|
||||
Open the application and scan the barcode or enter the key<br/>
|
||||
<p>${msg("totpStep2")}</p>
|
||||
<img src="${totp.totpSecretQrCodeUrl}" alt="Figure: Barcode"><br/>
|
||||
<span class="code">${totp.totpSecretEncoded}</span>
|
||||
</li>
|
||||
<li>
|
||||
Enter the one-time code provided by the application and click Submit to finish the setup.
|
||||
<p>${msg("totpStep3")}</p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
@ -58,8 +56,8 @@
|
|||
<div class="form-group">
|
||||
<div id="kc-form-buttons" class="col-md-offset-2 col-md-10 submit">
|
||||
<div class="">
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="submitAction" value="Save">Save</button>
|
||||
<button type="submit" class="btn btn-default btn-lg" name="submitAction" value="Cancel">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary btn-lg" name="submitAction" value="Save">${msg("doSave")}</button>
|
||||
<button type="submit" class="btn btn-default btn-lg" name="submitAction" value="Cancel">${msg("doCancel")}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
emailVerificationSubject=E-Mail verifizieren
|
||||
passwordResetSubject=Passwort zurückzusetzen
|
||||
passwordResetBody=Jemand hat angeforder Ihr Keycloak Passwort zurückzusetzen. Falls das Sie waren, dann klicken Sie auf den folgenden Link um das Passwort zurückzusetzen.\n\n{0}\n\nDieser Link wird in {1} Minuten ablaufen.\n\nFalls Sie das Passwort nicht zurücksetzen möchten, dann können Sie diese E-Mail ignorieren.
|
||||
passwordResetBody=Jemand hat angefordert Ihr Keycloak Passwort zurückzusetzen. Falls das Sie waren, dann klicken Sie auf den folgenden Link um das Passwort zurückzusetzen.\n\n{0}\n\nDieser Link wird in {1} Minuten ablaufen.\n\nFalls Sie das Passwort nicht zurücksetzen möchten, dann können Sie diese E-Mail ignorieren.
|
||||
emailVerificationBody=Jemand hat ein Keycloak Konto mit dieser E-Mail Adresse erstellt. Fall das Sie waren, dann klicken Sie auf den Link um die E-Mail Adresse zu verifizieren.\n\n{0}\n\nDieser Link wird in {1} Minuten ablaufen.\n\nFalls Sie dieses Konto nicht erstellt haben, dann können sie diese Nachricht ignorieren.
|
||||
eventLoginErrorSubject=Fehlgeschlagene Anmeldung
|
||||
eventLoginErrorBody=Jemand hat um {0} von {1} versucht sich mit ihrem Konto anzumelden. Falls das nicht Sie waren, dann kontaktieren Sie bitte Ihren Admin.
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<@layout.registrationLayout; section>
|
||||
<#if section = "title">
|
||||
<#if code.success>
|
||||
Success code=${code.code}
|
||||
${msg("codeSuccessTitle")}
|
||||
<#else>
|
||||
Error error=${code.error}
|
||||
${msg("codeErrorTitle", code.error)}
|
||||
</#if>
|
||||
<#elseif section = "form">
|
||||
<div id="kc-code">
|
||||
<#if code.success>
|
||||
<p>Please copy this code and paste it into your application:</p>
|
||||
<p>${msg("copyCodeInstruction")}</p>
|
||||
<input id="code" class="${properties.kcTextareaClass!}" value="${code.code}"/>
|
||||
<#else>
|
||||
<p id="error">${code.error}</p>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<#if oauth.claimsRequested??>
|
||||
<li>
|
||||
<span>
|
||||
Personal Info:
|
||||
${msg("personalInfo")}
|
||||
<#list oauth.claimsRequested as claim>
|
||||
${claim}
|
||||
${advancedMsg(claim)}<#if claim_has_next>, </#if>
|
||||
</#list>
|
||||
</span>
|
||||
</li>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<#if oauth.realmRolesRequested??>
|
||||
<#list oauth.realmRolesRequested as role>
|
||||
<li>
|
||||
<span><#if role.description??>${role.description}<#else>${role.name}</#if></span>
|
||||
<span><#if role.description??>${advancedMsg(role.description)}<#else>${advancedMsg(role.name)}</#if></span>
|
||||
</li>
|
||||
</#list>
|
||||
</#if>
|
||||
|
@ -37,8 +37,8 @@
|
|||
<#list oauth.resourceRolesRequested?keys as resource>
|
||||
<#list oauth.resourceRolesRequested[resource] as role>
|
||||
<li>
|
||||
<span class="kc-role"><#if role.description??>${role.description}<#else>${role.name}</#if></span>
|
||||
<span class="kc-resource">in <strong>${resource}</strong></span>
|
||||
<span class="kc-role"><#if role.description??>${advancedMsg(role.description)}<#else>${advancedMsg(role.name)}</#if></span>
|
||||
<span class="kc-resource">${msg("inResource", resource)}</span>
|
||||
</li>
|
||||
</#list>
|
||||
</#list>
|
||||
|
|
|
@ -12,16 +12,18 @@ registerWithTitleHtml=Registrierung bei <strong>{0}</strong>
|
|||
loginTitle=Anmeldung bei {0}
|
||||
loginTitleHtml=Anmeldung bei <strong>{0}</strong>
|
||||
loginOauthTitle=Temporärer zugriff auf {0}
|
||||
loginOauthTitleHtml=Temporärer zugriff auf <strong>{0}<strong> angefordert von <strong>{1}</strong>.
|
||||
loginOauthTitleHtml=Temporärer zugriff auf <strong>{0}</strong> angefordert von <strong>{1}</strong>.
|
||||
loginTotpTitle=Mobile Authentifizierung Einrichten
|
||||
loginProfileTitle=Benutzer Konto Informatinen aktualisieren
|
||||
loginProfileTitle=Benutzerkonto Informationen aktualisieren
|
||||
oauthGrantTitle=OAuth gewähren
|
||||
oauthGrantTitleHtml=Temporärer zugriff auf <strong>{0}<strong> angefordert von <strong>{1}</strong>.
|
||||
oauthGrantTitleHtml=Temporärer zugriff auf <strong>{0}</strong> angefordert von <strong>{1}</strong>.
|
||||
errorTitle=Es tut uns leid...
|
||||
errorTitleHtml=Es tut uns leid...
|
||||
emailVerifyTitle=E-Mail verifizieren
|
||||
emailForgotTitle=Passwort vergessen?
|
||||
updatePasswordTitle=Passwort aktualisieren
|
||||
codeSuccessTitle=Erfolgreicher code
|
||||
codeErrorTitle=Fehler code\: {0}
|
||||
|
||||
noAccount=Neuer Benutzer?
|
||||
username=Benutzername
|
||||
|
@ -47,7 +49,8 @@ loginTotpStep2=
|
|||
loginTotpStep3=Geben Sie den One-time Code welcher die Applikation generiert hat ein und klicken Sie auf Absenden.
|
||||
loginTotpOneTime=One-time Code
|
||||
|
||||
oauthGrantRequest=Do you grant these access privileges?
|
||||
oauthGrantRequest=Wollen Sie diese Zugriffsreche gewähren?
|
||||
inResource=in <strong>{0}</strong>
|
||||
|
||||
emailVerifyInstruction1=Ein E-Mail mit weitern Anweisungen wurde an Sie versendet.
|
||||
emailVerifyInstruction2=Falls Sie kein E-Mail erhalten haben, dann können Sie
|
||||
|
@ -58,10 +61,14 @@ backToApplication=« Zur
|
|||
|
||||
emailInstruction=Geben Sie ihren Benutzernamen oder E-Mail Adresse ein und klicken Sie auf Absenden. Danach werden wir ihnen ein E-Mail mit weiteren Instruktionen zusenden.
|
||||
|
||||
copyCodeInstruction=Bitte kopieren sie den folgenden Code und fügen ihn in die Applikation ein\:
|
||||
|
||||
personalInfo=Persönliche Informationen:
|
||||
|
||||
invalidUserMessage=Ungültiger Benutzername oder Passwort.
|
||||
invalidEmailMessage=Ungültige E-Mail Adresse.
|
||||
accountDisabledMessage=Benutzerkonto ist gesperrt, bitte kontaktieren Sie den Admin.
|
||||
accountTemporarilyDisabledMessage=Benutzerkonto ist temporär gespert, bitte kontaktieren Sie den Admin oder versuchen Sie es später nocheinmal.
|
||||
accountTemporarilyDisabledMessage=Benutzerkonto ist temporär gesperrt, bitte kontaktieren Sie den Admin oder versuchen Sie es später noch einmal.
|
||||
expiredCodeMessage=Zeitüberschreitung bei der Anmeldung. Bitter melden Sie sich erneut an.
|
||||
|
||||
missingFirstNameMessage=Bitte geben Sie einen Vornamen ein.
|
||||
|
@ -73,14 +80,14 @@ missingTotpMessage=Bitte geben Sie den One-time Code ein.
|
|||
notMatchPasswordMessage=Passwörter sind nicht identisch.
|
||||
|
||||
invalidPasswordExistingMessage=Das aktuelle Passwort is ungültig.
|
||||
invalidPasswordConfirmMessage=Die Passwort bestätigung ist nicht identisch.
|
||||
invalidPasswordConfirmMessage=Die Passwortbestätigung ist nicht identisch.
|
||||
invalidTotpMessage=Ungültiger One-time Code.
|
||||
|
||||
usernameExistsMessage=Benutzermane exisitert bereits.
|
||||
usernameExistsMessage=Benutzername existiert bereits.
|
||||
emailExistsMessage=E-Mail existiert bereits.
|
||||
|
||||
federatedIdentityEmailExistsMessage=Es exisitert bereits ein Benutzer mit dieser E-Mail Adresse. Bitte melden Sie sich bei der Benutzerverwaltung an um das Benutzerkonto zu verknüpfen.
|
||||
federatedIdentityUsernameExistsMessage=Es exisitert bereits ein Benutzer mit diesem Benutzernamen. Bitte melden Sie sich bei der Benutzerverwaltung an um das Benutzerkonto zu verknüpfen.
|
||||
federatedIdentityEmailExistsMessage=Es existiert bereits ein Benutzer mit dieser E-Mail Adresse. Bitte melden Sie sich bei der Benutzerverwaltung an um das Benutzerkonto zu verknüpfen.
|
||||
federatedIdentityUsernameExistsMessage=Es existiert bereits ein Benutzer mit diesem Benutzernamen. Bitte melden Sie sich bei der Benutzerverwaltung an um das Benutzerkonto zu verknüpfen.
|
||||
|
||||
configureTotpMessage=Sie müssen eine Mobile Authentifizierung einrichten um das Benutzerkonto zu aktivieren.
|
||||
updateProfileMessage=Sie müssen ihr Benutzerkonto aktualisieren um das Benutzerkonto zu aktivieren.
|
||||
|
@ -118,28 +125,28 @@ registrationNotAllowedMessage=Registrierung nicht erlaubt.
|
|||
permissionNotApprovedMessage=Berechtigung nicht bestätigt.
|
||||
noRelayStateInResponseMessage=Kein relay state in der Antwort von dem Identity Provider [{0}].
|
||||
identityProviderAlreadyLinkedMessage=Die Identität welche von dem Identity Provider [{0}] zurückgegeben wurde, ist bereits mit einem anderen Benutzer verknüpft.
|
||||
insufficientPermissionMessage=Nicht genügtend Rechte um die Identität zu verknüpfen.
|
||||
insufficientPermissionMessage=Nicht genügend Rechte um die Identität zu verknüpfen.
|
||||
couldNotProceedWithAuthenticationRequestMessage=Konnte den Authentifizierungs Request nicht weiter verarbeiten.
|
||||
couldNotObtainTokenMessage=Konnte kein token vom Identity Provider [{0}] entnehmen.
|
||||
unexpectedErrorRetrievingTokenMessage=Unerwarteter Fehler während dem Empfang des Token von dem Identity Provider [{0}].
|
||||
unexpectedErrorHandlingResponseMessage=Unerwarteter Fehler während der bearbeitung des Respons vom Identity Provider [{0}].
|
||||
unexpectedErrorHandlingResponseMessage=Unerwarteter Fehler während der Bearbeitung des Respons vom Identity Provider [{0}].
|
||||
identityProviderAuthenticationFailedMessage=Authentifizierung Fehlgeschlagen. Konnte sich mit dem Identity Provider [{0}] nicht authentifizieren.
|
||||
couldNotSendAuthenticationRequestMessage=Konnte Authentifizierungs Request nicht an den Identity Provider [{0}] schiken.
|
||||
unexpectedErrorHandlingRequestMessage=Unerwarteter Fehler während der bearbeitung des Requests zum Identity Provider [{0}].
|
||||
couldNotSendAuthenticationRequestMessage=Konnte Authentifizierungs Request nicht an den Identity Provider [{0}] schicken.
|
||||
unexpectedErrorHandlingRequestMessage=Unerwarteter Fehler während der Bearbeitung des Requests zum Identity Provider [{0}].
|
||||
invalidAccessCodeMessage=Ungültiger Access-Code.
|
||||
sessionNotActiveMessage=Session nicht aktiv.
|
||||
unknownCodeMessage=Unbekannter Code, bitte melden Sie sich erneut über die Applikation an.
|
||||
invalidCodeMessage=Ungültiger Code, bitte melden Sie sich erneut über die Applikation an.
|
||||
identityProviderUnexpectedErrorMessage=Unerwarteter Fehler während der Authentifizierung mit dem Identity Provider.
|
||||
identityProviderNotFoundMessage=Konnte kein Identity Provider mit der Idenität [{0}] finden.
|
||||
realmSupportsNoCredentialsMessage=Realm [{0}] unterstützt keine Credential Typen..
|
||||
identityProviderNotFoundMessage=Konnte kein Identity Provider mit der Identität [{0}] finden.
|
||||
realmSupportsNoCredentialsMessage=Realm [{0}] unterstützt keine Credential Typen.
|
||||
identityProviderNotUniqueMessage=Realm [{0}] unterstütz mehrere Identity Providers.
|
||||
|
||||
invalidParameterMessage=Invalid parameter\: {0}
|
||||
missingParameterMessage=Missing parameter\: {0}
|
||||
clientNotFoundMessage=Client not found.
|
||||
|
||||
emailVerifiedMessage=Ihr E-Mail Addresse wurde erfolgreich verifiziert.
|
||||
emailVerifiedMessage=Ihr E-Mail Adresse wurde erfolgreich verifiziert.
|
||||
|
||||
locale_de=Deutsch
|
||||
locale_en=Englisch
|
||||
|
|
|
@ -12,7 +12,7 @@ registerWithTitleHtml=Register with <strong>{0}</strong>
|
|||
loginTitle=Log in to {0}
|
||||
loginTitleHtml=Log in to <strong>{0}</strong>
|
||||
loginOauthTitle=Temporary access for {0}
|
||||
loginOauthTitleHtml=Temporary access for <strong>{0}<strong> requested by <strong>{1}</strong>.
|
||||
loginOauthTitleHtml=Temporary access for <strong>{0}</strong> requested by <strong>{1}</strong>.
|
||||
loginTotpTitle=Mobile Authenticator Setup
|
||||
loginProfileTitle=Update Account Information
|
||||
oauthGrantTitle=OAuth Grant
|
||||
|
@ -22,6 +22,8 @@ errorTitleHtml=We''re <strong>sorry</strong> ...
|
|||
emailVerifyTitle=Email verification
|
||||
emailForgotTitle=Forgot Your Password?
|
||||
updatePasswordTitle=Update password
|
||||
codeSuccessTitle=Success code
|
||||
codeErrorTitle=Error code\: {0}
|
||||
|
||||
noAccount=New user?
|
||||
username=Username
|
||||
|
@ -48,6 +50,7 @@ loginTotpStep3=Enter the one-time code provided by the application and click Sub
|
|||
loginTotpOneTime=One-time code
|
||||
|
||||
oauthGrantRequest=Do you grant these access privileges?
|
||||
inResource=in <strong>{0}</strong>
|
||||
|
||||
emailVerifyInstruction1=An email with instructions to verify your email address has been sent to you.
|
||||
emailVerifyInstruction2=Haven''t received a verification code in your email?
|
||||
|
@ -57,6 +60,10 @@ backToLogin=« Back to Login
|
|||
|
||||
emailInstruction=Enter your username or email address and we will send you instructions on how to create a new password.
|
||||
|
||||
copyCodeInstruction=Please copy this code and paste it into your application:
|
||||
|
||||
personalInfo=Personal Info:
|
||||
|
||||
invalidUserMessage=Invalid username or password.
|
||||
invalidEmailMessage=Invalid email address.
|
||||
accountDisabledMessage=Account is disabled, contact admin.
|
||||
|
@ -87,19 +94,19 @@ updatePasswordMessage=You need to change your password to activate your account.
|
|||
verifyEmailMessage=You need to verify your email address to activate your account.
|
||||
|
||||
emailSentMessage=You should receive an email shortly with further instructions.
|
||||
emailSendErrorMessage=Failed to send email, please try again later
|
||||
emailSendErrorMessage=Failed to send email, please try again later.
|
||||
|
||||
accountUpdatedMessage=Your account has been updated
|
||||
accountPasswordUpdatedMessage=Your password has been updated
|
||||
accountUpdatedMessage=Your account has been updated.
|
||||
accountPasswordUpdatedMessage=Your password has been updated.
|
||||
|
||||
noAccessMessage=No access
|
||||
|
||||
invalidPasswordMinLengthMessage=Invalid password: minimum length {0}
|
||||
invalidPasswordMinDigitsMessage=Invalid password: must contain at least {0} numerical digits
|
||||
invalidPasswordMinLowerCaseCharsMessage=Invalid password: must contain at least {0} lower case characters
|
||||
invalidPasswordMinUpperCaseCharsMessage=Invalid password: must contain at least {0} upper case characters
|
||||
invalidPasswordMinSpecialCharsMessage=Invalid password: must contain at least {0} special characters
|
||||
invalidPasswordNotUsernameMessage=Invalid password\: must not be equal to the username
|
||||
invalidPasswordMinLengthMessage=Invalid password: minimum length {0}.
|
||||
invalidPasswordMinDigitsMessage=Invalid password: must contain at least {0} numerical digits.
|
||||
invalidPasswordMinLowerCaseCharsMessage=Invalid password: must contain at least {0} lower case characters.
|
||||
invalidPasswordMinUpperCaseCharsMessage=Invalid password: must contain at least {0} upper case characters.
|
||||
invalidPasswordMinSpecialCharsMessage=Invalid password: must contain at least {0} special characters.
|
||||
invalidPasswordNotUsernameMessage=Invalid password\: must not be equal to the username.
|
||||
|
||||
failedToProcessResponseMessage=Failed to process response
|
||||
httpsRequiredMessage=HTTPS required
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.keycloak.OAuth2Constants;
|
|||
import org.keycloak.email.EmailException;
|
||||
import org.keycloak.email.EmailProvider;
|
||||
import org.keycloak.freemarker.*;
|
||||
import org.keycloak.freemarker.beans.AdvancedMessageFormatterMethod;
|
||||
import org.keycloak.freemarker.beans.MessageFormatterMethod;
|
||||
import org.keycloak.login.LoginFormsPages;
|
||||
import org.keycloak.login.LoginFormsProvider;
|
||||
|
@ -239,6 +240,7 @@ import java.util.concurrent.TimeUnit;
|
|||
break;
|
||||
case OAUTH_GRANT:
|
||||
attributes.put("oauth", new OAuthGrantBean(accessCode, clientSession, client, realmRolesRequested, resourceRolesRequested, this.accessRequestMessage));
|
||||
attributes.put("advancedMsg", new AdvancedMessageFormatterMethod(locale, messages));
|
||||
break;
|
||||
case CODE:
|
||||
attributes.put(OAuth2Constants.CODE, new CodeBean(accessCode, messageType == MessageType.ERROR ? message : null));
|
||||
|
|
|
@ -207,11 +207,11 @@ public class AccountTest {
|
|||
|
||||
changePasswordPage.changePassword("password", "new-password", "new-password2");
|
||||
|
||||
Assert.assertEquals("Password confirmation doesn't match", profilePage.getError());
|
||||
Assert.assertEquals("Password confirmation doesn't match.", profilePage.getError());
|
||||
|
||||
changePasswordPage.changePassword("password", "new-password", "new-password");
|
||||
|
||||
Assert.assertEquals("Your password has been updated", profilePage.getSuccess());
|
||||
Assert.assertEquals("Your password has been updated.", profilePage.getSuccess());
|
||||
|
||||
events.expectAccount(EventType.UPDATE_PASSWORD).assertEvent();
|
||||
|
||||
|
@ -256,7 +256,7 @@ public class AccountTest {
|
|||
|
||||
changePasswordPage.changePassword("password", "new-password", "new-password");
|
||||
|
||||
Assert.assertEquals("Your password has been updated", profilePage.getSuccess());
|
||||
Assert.assertEquals("Your password has been updated.", profilePage.getSuccess());
|
||||
|
||||
events.expectAccount(EventType.UPDATE_PASSWORD).assertEvent();
|
||||
} finally {
|
||||
|
@ -318,7 +318,7 @@ public class AccountTest {
|
|||
|
||||
profilePage.updateProfile("New first", "New last", "new@email.com");
|
||||
|
||||
Assert.assertEquals("Your account has been updated", profilePage.getSuccess());
|
||||
Assert.assertEquals("Your account has been updated.", profilePage.getSuccess());
|
||||
Assert.assertEquals("New first", profilePage.getFirstName());
|
||||
Assert.assertEquals("New last", profilePage.getLastName());
|
||||
Assert.assertEquals("new@email.com", profilePage.getEmail());
|
||||
|
@ -341,7 +341,7 @@ public class AccountTest {
|
|||
// Error with false code
|
||||
totpPage.configure(totp.generate(totpPage.getTotpSecret() + "123"));
|
||||
|
||||
Assert.assertEquals("Invalid authenticator code", profilePage.getError());
|
||||
Assert.assertEquals("Invalid authenticator code.", profilePage.getError());
|
||||
|
||||
totpPage.configure(totp.generate(totpPage.getTotpSecret()));
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ public abstract class AbstractKerberosTest {
|
|||
|
||||
// Successfully change password now
|
||||
changePasswordPage.changePassword("theduke", "newPass", "newPass");
|
||||
Assert.assertTrue(driver.getPageSource().contains("Your password has been updated"));
|
||||
Assert.assertTrue(driver.getPageSource().contains("Your password has been updated."));
|
||||
changePasswordPage.logout();
|
||||
|
||||
// Login with old password doesn't work, but with new password works
|
||||
|
|
|
@ -209,7 +209,7 @@ public class FederationProvidersIntegrationTest {
|
|||
loginPage.login("johnkeycloak", "Password1");
|
||||
changePasswordPage.changePassword("Password1", "New-password1", "New-password1");
|
||||
|
||||
Assert.assertEquals("Your password has been updated", profilePage.getSuccess());
|
||||
Assert.assertEquals("Your password has been updated.", profilePage.getSuccess());
|
||||
|
||||
changePasswordPage.logout();
|
||||
|
||||
|
@ -224,7 +224,7 @@ public class FederationProvidersIntegrationTest {
|
|||
// Change password back to previous value
|
||||
changePasswordPage.open();
|
||||
changePasswordPage.changePassword("New-password1", "Password1", "Password1");
|
||||
Assert.assertEquals("Your password has been updated", profilePage.getSuccess());
|
||||
Assert.assertEquals("Your password has been updated.", profilePage.getSuccess());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -109,7 +109,7 @@ public class KerberosLdapTest extends AbstractKerberosTest {
|
|||
|
||||
// Successfully change password now
|
||||
changePasswordPage.changePassword("theduke", "newPass", "newPass");
|
||||
Assert.assertTrue(driver.getPageSource().contains("Your password has been updated"));
|
||||
Assert.assertTrue(driver.getPageSource().contains("Your password has been updated."));
|
||||
changePasswordPage.logout();
|
||||
|
||||
// Login with old password doesn't work, but with new password works
|
||||
|
@ -136,7 +136,7 @@ public class KerberosLdapTest extends AbstractKerberosTest {
|
|||
loginPage.login("jduke", "newPass");
|
||||
changePasswordPage.assertCurrent();
|
||||
changePasswordPage.changePassword("newPass", "theduke", "theduke");
|
||||
Assert.assertTrue(driver.getPageSource().contains("Your password has been updated"));
|
||||
Assert.assertTrue(driver.getPageSource().contains("Your password has been updated."));
|
||||
changePasswordPage.logout();
|
||||
|
||||
spnegoResponse.close();
|
||||
|
|
|
@ -128,7 +128,7 @@ public class RegisterTest {
|
|||
registerPage.register("firstName", "lastName", "registerPasswordPolicy@email", "registerPasswordPolicy", "pass", "pass");
|
||||
|
||||
registerPage.assertCurrent();
|
||||
Assert.assertEquals("Invalid password: minimum length 8", registerPage.getError());
|
||||
Assert.assertEquals("Invalid password: minimum length 8.", registerPage.getError());
|
||||
|
||||
events.expectRegister("registerPasswordPolicy", "registerPasswordPolicy@email").user((String) null).error("invalid_registration").assertEvent();
|
||||
|
||||
|
|
|
@ -394,7 +394,7 @@ public class ResetPasswordTest {
|
|||
|
||||
errorPage.assertCurrent();
|
||||
|
||||
assertEquals("Failed to send email, please try again later", errorPage.getError());
|
||||
assertEquals("Failed to send email, please try again later.", errorPage.getError());
|
||||
|
||||
Thread.sleep(1000);
|
||||
|
||||
|
@ -446,7 +446,7 @@ public class ResetPasswordTest {
|
|||
|
||||
updatePasswordPage.changePassword("invalid", "invalid");
|
||||
|
||||
assertEquals("Invalid password: minimum length 8", resetPasswordPage.getErrorMessage());
|
||||
assertEquals("Invalid password: minimum length 8.", resetPasswordPage.getErrorMessage());
|
||||
|
||||
updatePasswordPage.changePassword("resetPasswordWithPasswordPolicy", "resetPasswordWithPasswordPolicy");
|
||||
|
||||
|
@ -504,7 +504,7 @@ public class ResetPasswordTest {
|
|||
events.expectRequiredAction(EventType.UPDATE_PASSWORD).user(userId).session(sessionId).detail(Details.USERNAME, username).assertEvent();
|
||||
|
||||
assertTrue(infoPage.isCurrent());
|
||||
assertEquals("Your password has been updated", infoPage.getInfo());
|
||||
assertEquals("Your password has been updated.", infoPage.getInfo());
|
||||
|
||||
loginPage.open();
|
||||
|
||||
|
|
|
@ -28,10 +28,8 @@ import org.junit.Test;
|
|||
import org.keycloak.OAuth2Constants;
|
||||
import org.keycloak.events.Details;
|
||||
import org.keycloak.events.Errors;
|
||||
import org.keycloak.events.EventType;
|
||||
import org.keycloak.models.Constants;
|
||||
import org.keycloak.models.RealmModel;
|
||||
import org.keycloak.protocol.oidc.OIDCLoginProtocolService;
|
||||
import org.keycloak.services.managers.ClientSessionCode;
|
||||
import org.keycloak.services.managers.RealmManager;
|
||||
import org.keycloak.testsuite.AssertEvents;
|
||||
|
@ -106,7 +104,7 @@ public class AuthorizationCodeTest {
|
|||
oauth.doLogin("test-user@localhost", "password");
|
||||
|
||||
String title = driver.getTitle();
|
||||
Assert.assertTrue(title.startsWith("Success code="));
|
||||
Assert.assertEquals("Success code", title);
|
||||
|
||||
String code = driver.findElement(By.id(OAuth2Constants.CODE)).getAttribute("value");
|
||||
keycloakRule.verifyCode(code);
|
||||
|
@ -136,7 +134,7 @@ public class AuthorizationCodeTest {
|
|||
driver.findElement(By.name("cancel")).click();
|
||||
|
||||
String title = driver.getTitle();
|
||||
Assert.assertTrue(title.equals("Error error=access_denied"));
|
||||
Assert.assertEquals("Error code: access_denied",title);
|
||||
|
||||
String error = driver.findElement(By.id(OAuth2Constants.ERROR)).getText();
|
||||
assertEquals("access_denied", error);
|
||||
|
|
Loading…
Reference in a new issue