Examples of PasswordCheckResult


Examples of org.jboss.as.domain.management.security.password.PasswordCheckResult

    private State getDetailedCheckState() {
        return new State() {

            @Override
            public State execute() {
                PasswordCheckResult result = PasswordCheckUtil.INSTANCE.check(false, stateValues.getUserName(), new String(
                        stateValues.getPassword()));
                if (result.getResult() == PasswordCheckResult.Result.WARN && stateValues.isSilentOrNonInteractive() == false) {
                    String message = result.getMessage();
                    String prompt = MESSAGES.sureToSetPassword(new String(stateValues.getPassword()));
                    State noState = new PromptNewUserState(theConsole, stateValues);
                    return new ConfirmationChoice(theConsole, message, prompt, ValidatePasswordState.this, noState);
                }

                if (result.getResult() == PasswordCheckResult.Result.REJECT) {
                    return new ErrorState(theConsole, result.getMessage(), getRetryState());
                }

                return ValidatePasswordState.this;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.