public function changePassword() {
    $this->requireTransaction();
    $session = $this->getSession();
    $permissionManager = $this->getPermissionManager();
    $request = $this->getRequest();
    $response = $this->getResponse();

    // load model
    $authUser = $this->principalFactory->getUser($session->getAuthUser());
    if ($authUser) {
      // add permissions for this operation
      $oidStr = $authUser->getOID()->__toString();
      $this->tempPermissions[] = $permissionManager->addTempPermission($oidStr, '', PersistenceAction::READ);
      $this->tempPermissions[] = $permissionManager->addTempPermission($oidStr.'.password', '', PersistenceAction::UPDATE);

      $this->changePasswordImpl($authUser, $request->getValue('oldpassword'),
          $request->getValue('newpassword1'), $request->getValue('newpassword2'));
    }
    // success
    $response->setAction('ok');
  }