Package org.sonatype.security.usermanagement

Examples of org.sonatype.security.usermanagement.InvalidCredentialsException


  {
    // first authenticate the user
    try {
      UsernamePasswordToken authenticationToken = new UsernamePasswordToken(userId, oldPassword);
      if (this.getSecurityManager().authenticate(authenticationToken) == null) {
        throw new InvalidCredentialsException();
      }
    }
    catch (org.apache.shiro.authc.AuthenticationException e) {
      this.logger.debug("User failed to change password reason: " + e.getMessage(), e);
      throw new InvalidCredentialsException();
    }

    // if that was good just change the password
    this.changePassword(userId, newPassword);
  }
View Full Code Here

TOP

Related Classes of org.sonatype.security.usermanagement.InvalidCredentialsException

Copyright © 2018 www.massapicom. 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.