messages refactoring

This commit is contained in:
Michael Gerber
2015-03-02 21:51:53 +01:00
parent 21f6384d0f
commit 08f1ae7840
15 changed files with 123 additions and 347 deletions

View File

@@ -1,52 +0,0 @@
authenticatorCode=One-time code
email=E-Mail
errorHeader=Error!
firstName=Vorname
lastName=Nachname
password=Passwort
passwordConfirm=Confirmation
passwordNew=New Password
successHeader=Success!
username=Username
missingFirstName=Please specify first name
invalidEmail=Invalid email address
missingLastName=Please specify last name
missingEmail=Please specify email
missingPassword=Please specify password.
notMatchPassword=Passwords don't match
missingTotp=Please specify authenticator code
invalidPasswordExisting=Invalid existing password
invalidPasswordConfirm=Password confirmation doesn't match
invalidTotp=Invalid authenticator code
readOnlyUser=You can't update your account as it is read only
readOnlyPassword=You can't update your password as your account is read only
successTotp=Mobile authenticator configured.
successTotpRemoved=Mobile authenticator removed.
accountUpdated=Your account has been updated
accountPasswordUpdated=Your password has been updated
missingIdentityProvider=Identity provider not specified
invalidFederatedIdentityAction=Invalid or missing action
identityProviderNotFound=Specified identity provider not found
federatedIdentityLinkNotActive=This identity is not active anymore
federatedIdentityRemovingLastProvider=You can't remove last federated identity as you don't have password
identityProviderRedirectError=Failed to redirect to identity provider
identityProviderRemoved=Identity provider removed successfully
accountDisabled=Account is disabled, contact admin
accountTemporarilyDisabled=Account is temporarily disabled, contact admin or try again later
logOutAllSessions=Log out all sessions
invalidPasswordMinLength=Invalid password\: minimum length {0}
invalidPasswordMinDigits=Invalid password\: must contain at least {0} numerical digits
invalidPasswordMinLowerCaseChars=Invalid password\: must contain at least {0} lower case characters
invalidPasswordMinUpperCaseChars=Invalid password\: must contain at least {0} upper case characters
invalidPasswordMinSpecialChars=Invalid password\: must contain at least {0} special characters
locale_de=Deutsch
locale_en=Englisch

View File

@@ -23,7 +23,7 @@
</div>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<input class="btn btn-primary btn-lg" type="submit" value="${rb.submit}"/>
<input class="btn btn-primary btn-lg" type="submit" value="${rb.doSubmit}"/>
</div>
</div>
</form>

View File

@@ -4,7 +4,7 @@
<#if section = "title">
${rb.oauthGrantTitle}
<#elseif section = "header">
Temporary access for <strong>${(realm.name)!''}</strong> requested by <strong>${(client.clientId)!''}</strong>.
${rb.oauthGrantTitleHtml?replace("{0}", (realm.name!''))?replace("{0}", (client.clientId!''))}
<#elseif section = "form">
<div id="kc-oauth" class="content-area">
<h3>${rb.oauthGrantRequest}</h3>
@@ -55,8 +55,8 @@
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<div class="${properties.kcFormButtonsWrapperClass!}">
<input class="btn btn-primary btn-lg" name="accept" id="kc-login" type="submit" value="${rb.yes}"/>
<input class="btn btn-default btn-lg" name="cancel" id="kc-cancel" type="submit" value="${rb.no}"/>
<input class="btn btn-primary btn-lg" name="accept" id="kc-login" type="submit" value="${rb.doYes}"/>
<input class="btn btn-default btn-lg" name="cancel" id="kc-cancel" type="submit" value="${rb.doNo}"/>
</div>
</div>
</div>

View File

@@ -23,7 +23,7 @@
</div>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<input class="btn btn-primary btn-lg" type="submit" value="${rb.submit}"/>
<input class="btn btn-primary btn-lg" type="submit" value="${rb.doSubmit}"/>
</div>
</div>
</form>

View File

@@ -1,9 +1,9 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout; section>
<#if section = "title">
${rb.loginTitle} ${realm.name}
${rb.loginTitle?replace("{0}",realm.name)}
<#elseif section = "header">
${rb.loginTitle} <strong>${realm.name}</strong>
${rb.loginTitle?replace("{0}", "<strong>" + realm.name + "<s/trong>")}
<#elseif section = "form">
<form id="kc-totp-login-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
<input id="username" name="username" value="${login.username!''}" type="hidden" />
@@ -27,8 +27,8 @@
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<div class="${properties.kcFormButtonsWrapperClass!}">
<input class="btn btn-primary btn-lg" name="login" id="kc-login" type="submit" value="${rb.logIn}"/>
<input class="btn btn-default btn-lg" name="cancel" id="kc-cancel" type="submit" value="${rb.cancel}"/>
<input class="btn btn-primary btn-lg" name="login" id="kc-login" type="submit" value="${rb.doLogIn}"/>
<input class="btn btn-default btn-lg" name="cancel" id="kc-cancel" type="submit" value="${rb.doCancel}"/>
</div>
</div>
</div>

View File

@@ -31,7 +31,7 @@
</div>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<input class="btn btn-primary btn-lg" type="submit" value="${rb.submit}"/>
<input class="btn btn-primary btn-lg" type="submit" value="${rb.doSubmit}"/>
</div>
</div>
</form>

View File

@@ -40,7 +40,7 @@
</div>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<input class="btn btn-primary btn-lg" type="submit" value="${rb.submit}" />
<input class="btn btn-primary btn-lg" type="submit" value="${rb.doSubmit}" />
</div>
</div>
</form>

View File

@@ -6,10 +6,10 @@
${rb.emailVerifyTitle}
<#elseif section = "form">
<p class="instruction">
${rb.emailVerifyInstr}
${rb.emailVerifyInstruction1}
</p>
<p class="instruction">${rb.emailVerifyInstrQ}
<a href="${url.loginEmailVerificationUrl}">${rb.emailVerifyClick}</a> ${rb.emailVerifyResend}
<p class="instruction">
${rb.emailVerifyInstruction2} <a href="${url.loginEmailVerificationUrl}">${rb.doClickHere}</a> ${rb.emailVerifyInstruction3}
</p>
</#if>
</@layout.registrationLayout>

View File

@@ -2,15 +2,15 @@
<@layout.registrationLayout displayInfo=social.displayInfo; section>
<#if section = "title">
<#if client.application>
${rb.loginTitle} ${realm.name}
${rb.loginTitle?replace("{0}",(realm.name!''))}
<#elseif client.oauthClient>
${realm.name} ${rb.loginOauthTitle}
${rb.loginOauthTitle?replace("{0}",(realm.name!''))}
</#if>
<#elseif section = "header">
<#if client.application>
${rb.loginTitle} <strong>${(realm.name)!''}</strong>
${rb.loginTitle?replace("{0}", (realm.name!''))}
<#elseif client.oauthClient>
Temporary access for <strong>${(realm.name)!''}</strong> requested by <strong>${(client.clientId)!''}</strong>.
${rb.loginOauthTitleHtml?replace("{0}", (realm.name!''))?replace("{0}", (client.clientId!''))}
</#if>
<#elseif section = "form">
<#if realm.password>
@@ -41,24 +41,24 @@
<div class="checkbox">
<label>
<#if login.rememberMe??>
<input id="rememberMe" name="rememberMe" type="checkbox" tabindex="3" checked> Remember Me
<input id="rememberMe" name="rememberMe" type="checkbox" tabindex="3" checked> ${rb.rememberMe}
<#else>
<input id="rememberMe" name="rememberMe" type="checkbox" tabindex="3"> Remember Me
<input id="rememberMe" name="rememberMe" type="checkbox" tabindex="3"> ${rb.rememberMe}
</#if>
</label>
</div>
</#if>
<div class="${properties.kcFormOptionsWrapperClass!}">
<#if realm.resetPasswordAllowed>
<span>${rb.loginForgot} <a href="${url.loginPasswordResetUrl}">${rb.password}</a>?</span>
<span><a href="${url.loginPasswordResetUrl}">${rb.doForgotPassword}</a></span>
</#if>
</div>
</div>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<div class="${properties.kcFormButtonsWrapperClass!}">
<input class="btn btn-primary btn-lg" name="login" id="kc-login" type="submit" value="${rb.logIn}"/>
<input class="btn btn-default btn-lg" name="cancel" id="kc-cancel" type="submit" value="${rb.cancel}"/>
<input class="btn btn-primary btn-lg" name="login" id="kc-login" type="submit" value="${rb.doLogIn}"/>
<input class="btn btn-default btn-lg" name="cancel" id="kc-cancel" type="submit" value="${rb.doCancel}"/>
</div>
</div>
</div>
@@ -75,7 +75,7 @@
<#elseif section = "info" >
<#if realm.password && realm.registrationAllowed>
<div id="kc-registration">
<span>${rb.noAccount} <a href="${url.registrationUrl}">${rb.register}</a></span>
<span>${rb.noAccount} <a href="${url.registrationUrl}">${rb.doRegister}</a></span>
</div>
</#if>

View File

@@ -1,165 +0,0 @@
logIn=Anmelden
logInTo=Anmelden bei
logInWith=Anmelden mit
noAccount=Neuer Benutzer?
register=Anmelden
registerWith=Anmelden mit
allRequired=Alle Felder sind erforderlich
alreadyHaveAccount=Haben Sie bereits ein Konto?
poweredByKeycloak=Powered by Keycloak
username=Benutzername
usernameOrEmail=Benutzername oder E-Mail
fullName=Voller Name
firstName=Vorname
lastName=Nachname
email=E-Mail
password=Passwort
rememberMe=Angemeldet bleiben
passwordConfirm=Passwort Bestätigen
passwordNew=Neues Passwort
passwordNewConfirm=Neues Passwort bestätigen
cancel=Abbrechen
accept=Akzeptieren
submit=Absenden
yes=Ja
no=Nein
authenticatorCode=Einmaliger Code
clientCertificate=Client Zertifikat
invalidUser=Ungültiger Benutzername oder Passwort.
invalidPassword=Ungültiger Benutzername oder Passwort.
invalidEmail=Invalid email address
accountDisabled=Account is disabled, contact admin
accountTemporarilyDisabled=Account is temporarily disabled, contact admin or try again later
expiredCode=Login timeout. Please login again
missingFirstName=Please specify first name
missingLastName=Please specify last name
missingEmail=Please specify email
missingUsername=Please specify username
missingPassword=Please specify password.
notMatchPassword=Passwords don't match
missingTotp=Please specify authenticator code
invalidPasswordExisting=Invalid existing password
invalidPasswordConfirm=Password confirmation doesn't match
invalidTotp=Invalid authenticator code
successTotp=Mobile authenticator configured.
successTotpRemoved=Mobile authenticator removed.
usernameExists=Username already exists
emailExists=Email already exists
federatedIdentityEmailExists=User with email already exists. Please login to account management to link the account.
federatedIdentityUsernameExists=User with username already exists. Please login to account management to link the account.
federatedIdentityDisabledRegistration=Registration of new users is not allowed. Please ask admin to register you and login to account management to link the account.
loginTitle=Log in to
loginOauthTitle=Temporary access.
loginOauthTitleHtml=Temporary access requested. Login to grant access.
loginForgot=Forgot
loginTotpTitle=Mobile Authenticator Setup
loginTotpStep1=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
loginTotpStep2=Open the application and scan the barcode or enter the key
loginTotpStep3=Enter the one-time code provided by the application and click Submit to finish the setup
loginTotpOneTime=One-time code
loginProfileTitle=Update Account Information
loginProfileWarning=Your account is not enabled because you need to update your account information.
loginProfileWarningFollow=Please follow the steps below.
loginProfileError=Some required fields are empty or incorrect.
loginProfileErrorSteps=Please correct the fields in red.
oauthGrantTitle=OAuth Grant
oauthGrantTitleHtml=Temporary access requested
oauthGrantTerms=Keycloak Central Login and Google will use this information in accordance with their respective terms of service and privacy policies.
oauthGrantRequest=Do you grant these access privileges?
oauthGrantLoginRequest=Do you grant access?
emailVerifyTitle=Email verification
emailVerifyInstr=An email with instructions to verify your email address has been sent to you.
emailVerifyInstrQ=Haven't received a verification code in your email?
emailVerifyClick=Click here
emailVerifyResend=to re-send the email.
error=A system error has occured, contact admin
errorTitle=We're sorry...
errorTitleHtml=We're <strong>sorry</strong> ...
errorGenericMsg=Something happened and we could not process your request.
actionWarningHeader=Your account is not enabled.
actionTotpWarning=You need to set up Mobile Authenticator to activate your account.
actionProfileWarning=You need to update your user profile to activate your account.
actionPasswordWarning=You need to change your password to activate your account.
actionEmailWarning=You need to verify your email address to activate your account.
actionFollow=Please fill in the fields below.
errorKerberosLogin=Kerberos ticket not available. Authenticate with password.
successHeader=Success!
errorHeader=Error!
# Forgot password part
emailForgotHeader=Forgot Your Password?
backToLogin=&laquo; Back to Login
emailUpdateHeader=Update password
emailSent=You should receive an email shortly with further instructions.
emailSendError=Failed to send email, please try again later
emailError=Invalid email.
emailErrorInfo=Please, fill in the fields again.
emailInstruction=Enter your username or email address and we will send you instructions on how to create a new password.
accountUpdated=Your account has been updated
accountPasswordUpdated=Your password has been updated
identityProviderUnexpectedError=Unexpected error when authenticating with identity provider
identityProviderNotFound=Could not find an identity provider with the identifier [{0}].
identityProviderNoToken=Could not obtain token from identity provider [{0}].
realmSupportsNoCredentials=Realm [{0}] does not support any credential type.
identityProviderNotUnique=Realm [{0}] supports multiple identity providers. Could not determine which identity provider should be used to authenticate with.
noAccess=No access
invalidPasswordMinLength=Invalid password: minimum length {0}
invalidPasswordMinDigits=Invalid password\: must contain at least {0} numerical digits
invalidPasswordMinLowerCaseChars=Invalid password: must contain at least {0} lower case characters
invalidPasswordMinUpperCaseChars=Invalid password: must contain at least {0} upper case characters
invalidPasswordMinSpecialChars=Invalid password: must contain at least {0} special characters
failedToProcessResponse=Failed to process response
httpsRequired=HTTPS required
realmNotEnabled=Realm not enabled
invalidRequest=Invalid Request
unknownLoginRequester=Unknown login requester
loginRequesterNotEnabled=Login requester not enabled
bearerOnly=Bearer-only applications are not allowed to initiate browser login
directGrantsOnly=Direct-grants-only clients are not allowed to initiate browser login
invalidRedirectUri=Invalid redirect uri
unsupportedNameIdFormat=Unsupported NameIDFormat
invlidRequester=Invalid requester
registrationNotAllowed=Registration not allowed
permissionNotApproved=Permission not approved.
noRelayStateInResponse=No relay state in response from identity provider [{0}].
identityProviderAlreadyLinked=The identity returned by the identity provider [{0}] is already linked to another user.
userDisabled="User is disabled."
insufficientPermission=Insufficient permissions to link identities.
couldNotProceedWithAuthenticationRequest=Could not proceed with authentication request to identity provider.
couldNotObtainToken=Could not obtain token from identity provider [{0}].
unexpectedErrorRetrievingToken=Unexpected error when retrieving token from identity provider [{0}].
unexpectedErrorHandlingResponse=Unexpected error when handling response from identity provider [{0}].
identityProviderAuthenticationFailed=Authentication failed. Could not authenticate with identity provider [{0}].
couldNotSendAuthenticationRequest=Could not send authentication request to identity provider [{0}].
unexpectedErrorHandlingRequest=Unexpected error when handling authentication request to identity provider [{0}].
invalidAccessCode=Invalid access code.
sessionNotActive=Session not active.
unknownCode=Unknown code, please login again through your application.
invalidCode=Invalid code, please login again through your application.
locale_de=Deutsch
locale_en=Englisch

View File

@@ -1,95 +1,80 @@
logIn=Log in
logInTo=Log in to
logInWith=Log in with
noAccount=New user?
register=Register
registerWith=Register with
allRequired=All fields are required
alreadyHaveAccount=Already have an account?
doLogIn=Log in
doRegister=Register
doCancel=Cancel
doSubmit=Submit
doYes=Yes
doNo=No
doForgotPassword=Forgot Password?
doClickHere=Click here
poweredByKeycloak=Powered by Keycloak
noAccount=New user?
registerWithTitle=Register with {0}
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>.
loginTotpTitle=Mobile Authenticator Setup
loginProfileTitle=Update Account Information
oauthGrantTitle=OAuth Grant
oauthGrantTitleHtml=Temporary access for <strong>{0}</strong> requested by <strong>{1}</strong>.
errorTitle=We're sorry...
errorTitleHtml=We're <strong>sorry</strong> ...
emailVerifyTitle=Email verification
username=Username
usernameOrEmail=Username or email
fullName=Full name
firstName=First name
fullName=Full name
lastName=Last name
email=Email
password=Password
rememberMe=Remember me
passwordConfirm=Confirm password
passwordNew=New Password
passwordNewConfirm=New Password confirmation
cancel=Cancel
accept=Accept
submit=Submit
yes=Yes
no=No
rememberMe=Remember me
authenticatorCode=One-time code
clientCertificate=Client Certificate
invalidUser=Invalid username or password.
invalidPassword=Invalid username or password.
invalidEmail=Invalid email address
accountDisabled=Account is disabled, contact admin
accountTemporarilyDisabled=Account is temporarily disabled, contact admin or try again later
expiredCode=Login timeout. Please login again
missingFirstName=Please specify first name
missingLastName=Please specify last name
missingEmail=Please specify email
missingUsername=Please specify username
missingPassword=Please specify password.
notMatchPassword=Passwords don't match
missingTotp=Please specify authenticator code
invalidPasswordExisting=Invalid existing password
invalidPasswordConfirm=Password confirmation doesn't match
invalidTotp=Invalid authenticator code
successTotp=Mobile authenticator configured.
successTotpRemoved=Mobile authenticator removed.
usernameExists=Username already exists
emailExists=Email already exists
federatedIdentityEmailExists=User with email already exists. Please login to account management to link the account.
federatedIdentityUsernameExists=User with username already exists. Please login to account management to link the account.
federatedIdentityDisabledRegistration=Registration of new users is not allowed. Please ask admin to register you and login to account management to link the account.
loginTitle=Log in to
loginOauthTitle=Temporary access.
loginOauthTitleHtml=Temporary access requested. Login to grant access.
loginForgot=Forgot
loginTotpTitle=Mobile Authenticator Setup
loginTotpStep1=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
loginTotpStep2=Open the application and scan the barcode or enter the key
loginTotpStep3=Enter the one-time code provided by the application and click Submit to finish the setup
loginTotpOneTime=One-time code
loginProfileTitle=Update Account Information
loginProfileWarning=Your account is not enabled because you need to update your account information.
loginProfileWarningFollow=Please follow the steps below.
loginProfileError=Some required fields are empty or incorrect.
loginProfileErrorSteps=Please correct the fields in red.
oauthGrantTitle=OAuth Grant
oauthGrantTitleHtml=Temporary access requested
oauthGrantTerms=Keycloak Central Login and Google will use this information in accordance with their respective terms of service and privacy policies.
oauthGrantRequest=Do you grant these access privileges?
oauthGrantLoginRequest=Do you grant access?
emailVerifyTitle=Email verification
emailVerifyInstr=An email with instructions to verify your email address has been sent to you.
emailVerifyInstrQ=Haven't received a verification code in your email?
emailVerifyClick=Click here
emailVerifyResend=to re-send the email.
invalidUserMessage=Invalid username or password.
invalidEmailMessage=Invalid email address.
accountDisabledMessage=Account is disabled, contact admin.
accountTemporarilyDisabledMessage=Account is temporarily disabled, contact admin or try again later.
expiredCodeMessage=Login timeout. Please login again.
missingFirstNameMessage=Please specify first name.
missingLastNameMessage=Please specify last name.
missingEmailMessage=Please specify email.
missingUsernameMessage=Please specify username.
missingPasswordMessage=Please specify password.
missingTotpMessage=Please specify authenticator code.
notMatchPasswordMessage=Passwords don't match.
invalidPasswordExistingMessage=Invalid existing password.
invalidPasswordConfirmMessage=Password confirmation doesn't match.
invalidTotpMessage=Invalid authenticator code.
usernameExistsMessage=Username already exists.
emailExistsMessage=Email already exists.
federatedIdentityEmailExistsMessage=User with email already exists. Please login to account management to link the account.
federatedIdentityUsernameExistsMessage=User with username already exists. Please login to account management to link the account.
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?
emailVerifyInstruction3=to re-send the email.
error=A system error has occured, contact admin
errorTitle=We're sorry...
errorTitleHtml=We're <strong>sorry</strong> ...
errorGenericMsg=Something happened and we could not process your request.
actionWarningHeader=Your account is not enabled.
actionTotpWarning=You need to set up Mobile Authenticator to activate your account.
@@ -160,4 +145,6 @@ identityProviderNoToken=Could not obtain token from identity provider [{0}].
realmSupportsNoCredentials=Realm [{0}] does not support any credential type.
identityProviderNotUnique=Realm [{0}] supports multiple identity providers. Could not determine which identity provider should be used to authenticate with.
locale_de=German
locale_en=English
locale_en=English
poweredByKeycloak=Powered by Keycloak

View File

@@ -1,9 +1,10 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout; section>
<#if section = "title">
${rb.registerWith} ${realm.name}
${rb.registerWithTitle} ${realm.name}
${rb.loginTitle?replace("{0}",(realm.name!''))}
<#elseif section = "header">
${rb.registerWith} <strong>${realm.name}</strong>
${rb.registerWithTitle?replace("{0}", ((realm.name!''))}
<#elseif section = "form">
<form id="kc-register-form" class="${properties.kcFormClass!}" action="${url.registrationAction}" method="post">
<div class="${properties.kcFormGroupClass!}">
@@ -68,7 +69,7 @@
</div>
<div id="kc-form-buttons" class="${properties.kcFormButtonsClass!}">
<input class="btn btn-primary btn-lg" type="submit" value="${rb.register}"/>
<input class="btn btn-primary btn-lg" type="submit" value="${rb.doRegister}"/>
</div>
</div>
</form>

View File

@@ -26,46 +26,50 @@ package org.keycloak.services.messages;
*/
public class Messages {
public static final String ACCOUNT_DISABLED = "accountDisabled";
public static final String INVALID_USER = "invalidUserMessage";
public static final String ACCOUNT_TEMPORARILY_DISABLED = "accountTemporarilyDisabled";
public static final String INVALID_EMAIL = "invalidEmailMessage";
public static final String INVALID_PASSWORD = "invalidPassword";
public static final String ACCOUNT_DISABLED = "accountDisabledMessage";
public static final String INVALID_PASSWORD_EXISTING = "invalidPasswordExisting";
public static final String ACCOUNT_TEMPORARILY_DISABLED = "accountTemporarilyDisabledMessage";
public static final String INVALID_PASSWORD_CONFIRM = "invalidPasswordConfirm";
public static final String EXPIRED_CODE = "expiredCodeMessage";
public static final String INVALID_EMAIL = "invalidEmail";
public static final String MISSING_FIRST_NAME = "missingFirstNameMessage";
public static final String MISSING_LAST_NAME = "missingLastNameMessage";
public static final String MISSING_EMAIL = "missingEmailMessage";
public static final String MISSING_USERNAME = "missingUsernameMessage";
public static final String MISSING_PASSWORD = "missingPasswordMessage";
public static final String MISSING_TOTP = "missingTotpMessage";
public static final String NOTMATCH_PASSWORD = "notMatchPasswordMessage";
public static final String INVALID_PASSWORD_EXISTING = "invalidPasswordExistingMessage";
public static final String INVALID_PASSWORD_CONFIRM = "invalidPasswordConfirmMessage";
public static final String INVALID_TOTP = "invalidTotpMessage";
public static final String USERNAME_EXISTS = "usernameExistsMessage";
public static final String EMAIL_EXISTS = "emailExistsMessage";
public static final String FEDERATED_IDENTITY_EMAIL_EXISTS = "federatedIdentityEmailExistsMessage";
public static final String FEDERATED_IDENTITY_USERNAME_EXISTS = "federatedIdentityUsernameExistsMessage";
public static final String INVALID_USER = "invalidUser";
public static final String EXPIRED_CODE = "expiredCode";
public static final String READ_ONLY_USER = "readOnlyUser";
public static final String READ_ONLY_PASSWORD = "readOnlyPassword";
public static final String MISSING_EMAIL = "missingEmail";
public static final String MISSING_FIRST_NAME = "missingFirstName";
public static final String MISSING_LAST_NAME = "missingLastName";
public static final String MISSING_PASSWORD = "missingPassword";
public static final String NOTMATCH_PASSWORD = "notMatchPassword";
public static final String MISSING_USERNAME = "missingUsername";
public static final String MISSING_TOTP = "missingTotp";
public static final String INVALID_TOTP = "invalidTotp";
public static final String USERNAME_EXISTS = "usernameExists";
public static final String EMAIL_EXISTS = "emailExists";
public static final String ACTION_WARN_TOTP = "actionTotpWarning";
public static final String ACTION_WARN_PROFILE = "actionProfileWarning";
@@ -138,7 +142,6 @@ public class Messages {
public static final String INSUFFICIENT_PERMISSION = "insufficientPermission";
public static final String COULD_NOT_PROCEED_WITH_AUTHENTICATION_REQUEST = "couldNotProceedWithAuthenticationRequest";
public static final String COULD_NOT_OBTAIN_TOKEN = "couldNotObtainToken";
@@ -160,4 +163,6 @@ public class Messages {
public static final String UNKNOWN_CODE = "unknownCode";
public static final String INVALID_CODE = "invalidCode";
}

View File

@@ -534,14 +534,14 @@ public class IdentityBrokerService {
if (existingUser != null) {
fireErrorEvent(Errors.FEDERATED_IDENTITY_EMAIL_EXISTS);
throw new IdentityBrokerException("federatedIdentityEmailExists");
throw new IdentityBrokerException(Messages.FEDERATED_IDENTITY_EMAIL_EXISTS);
}
existingUser = this.session.users().getUserByUsername(updatedIdentity.getUsername(), this.realmModel);
if (existingUser != null) {
fireErrorEvent(Errors.FEDERATED_IDENTITY_USERNAME_EXISTS);
throw new IdentityBrokerException("federatedIdentityUsernameExists");
throw new IdentityBrokerException(Messages.FEDERATED_IDENTITY_USERNAME_EXISTS);
}
if (isDebugEnabled()) {