"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "support/cas-server-support-pm-webflow/src/main/java/org/apereo/cas/pm/web/flow/actions/PasswordChangeAction.java" between
cas-6.0.4.tar.gz and cas-6.0.5.tar.gz

About: CAS (Central Authentication Service) is an authentication system (providing single sign-on service).

PasswordChangeAction.java  (cas-6.0.4):PasswordChangeAction.java  (cas-6.0.5)
skipping to change at line 40 skipping to change at line 40
public class PasswordChangeAction extends AbstractAction { public class PasswordChangeAction extends AbstractAction {
/** /**
* Password Update Success event. * Password Update Success event.
*/ */
public static final String PASSWORD_UPDATE_SUCCESS = "passwordUpdateSuccess" ; public static final String PASSWORD_UPDATE_SUCCESS = "passwordUpdateSuccess" ;
private static final String PASSWORD_VALIDATION_FAILURE_CODE = "pm.validatio nFailure"; private static final String PASSWORD_VALIDATION_FAILURE_CODE = "pm.validatio nFailure";
private static final String DEFAULT_MESSAGE = "Could not update the account password"; private static final String DEFAULT_MESSAGE = "Could not update the account password";
private static final MessageBuilder ERROR_MSG_BUILDER = new MessageBuilder()
.error();
private final PasswordManagementService passwordManagementService; private final PasswordManagementService passwordManagementService;
private final PasswordValidationService passwordValidationService; private final PasswordValidationService passwordValidationService;
private final CommunicationsManager communicationsManager; private final CommunicationsManager communicationsManager;
@Override @Override
protected Event doExecute(final RequestContext requestContext) { protected Event doExecute(final RequestContext requestContext) {
try { try {
val c = (UsernamePasswordCredential) WebUtils.getCredential(requestC ontext); val c = (UsernamePasswordCredential) WebUtils.getCredential(requestC ontext);
val bean = requestContext.getFlowScope().get(PasswordManagementWebfl owConfigurer.FLOW_VAR_ID_PASSWORD, PasswordChangeBean.class); val bean = requestContext.getFlowScope().get(PasswordManagementWebfl owConfigurer.FLOW_VAR_ID_PASSWORD, PasswordChangeBean.class);
skipping to change at line 73 skipping to change at line 71
PASSWORD_VALIDATION_FAILURE_CODE + StringUtils.defaultIfBlank(e. getCode(), ""), PASSWORD_VALIDATION_FAILURE_CODE + StringUtils.defaultIfBlank(e. getCode(), ""),
StringUtils.defaultIfBlank(e.getValidationMessage(), DEFAULT_MES SAGE), StringUtils.defaultIfBlank(e.getValidationMessage(), DEFAULT_MES SAGE),
e.getParams()); e.getParams());
} catch (final Exception e) { } catch (final Exception e) {
LOGGER.error(e.getMessage(), e); LOGGER.error(e.getMessage(), e);
} }
return getErrorEvent(requestContext, "pm.updateFailure", DEFAULT_MESSAGE ); return getErrorEvent(requestContext, "pm.updateFailure", DEFAULT_MESSAGE );
} }
private Event getErrorEvent(final RequestContext ctx, final String code, fin al String message, final Object... params) { private Event getErrorEvent(final RequestContext ctx, final String code, fin al String message, final Object... params) {
ctx.getMessageContext().addMessage(ERROR_MSG_BUILDER.code(code).defaultT ext(message).args(params).build()); ctx.getMessageContext().addMessage(new MessageBuilder().error().code(cod e).defaultText(message).args(params).build());
return error(); return error();
} }
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)