Validates authentication through a password. The actual password must be provided here.
It is strongly recommended not store the password in plain-text and use validateA1 instead.
328725
public function validatePassword(string $password): bool
    {
        $this->A1 = md5($this->digestParts['username'].':'.$this->realm.':'.$password);

        return $this->validate();
    }
837237
def authenticate(self, username, password):
        

        r = self._query_('/users/authenticate', 'POST',
                         params={'username': username,
                                 'password': password})
        if r.status_code == 201:
            return r.text.strip('"')
        else:
            raise ValueError('Authentication invalid.')
874455
def validate_authentication(self, username, password, handler):
        
        user = authenticate(
            **{self.username_field: username, 'password': password}
        )
        account = self.get_account(username)
        if not (user and account):
            raise AuthenticationFailed("Authentication failed.")
494634
public function validate()
	{
		if ( ! $login = $this->{static::$loginAttribute})
		{
			throw new LoginRequiredException("A login is required for a user, none given.");
		}

		if ( ! $password = $this->getPassword())
		{
			throw new PasswordRequiredException("A password is required for user [$login], none given.");
		}

		// Check if the user already exists
		$query = $this->newQuery();
		$persistedUser = $query->where($this->getLoginName(), '=', $login)->first();

		if ($persistedUser and $persistedUser->getId() != $this->getId())
		{
			throw new UserExistsException("A user already exists with login [$login], logins must be unique for users.");
		}

		return true;
	}
1125437
public function validatePassword(string $password): bool
    {
        return \Yii::$app->security->validatePassword($password, $this->password_hash);
    }
100285
def authenticated?(password)
      if password_object == password
        update_hash!(password) if password_object.stale?
        return true
      end

      return false
    end
755688
protected boolean isPasswordValid() {

        if ((m_pw.getPassword1() == null) | (m_pw.getPassword2() == null)) {
            return false;
        }
        try {
            CmsPasswordInfo pwdInfo = new CmsPasswordInfo();
            pwdInfo.setNewPwd(m_pw.getPassword1());
            pwdInfo.setConfirmation(m_pw.getPassword2());

            pwdInfo.validate();
            return true;
        } catch (CmsIllegalArgumentException | CmsIllegalStateException e) {
            LOG.error("New password is not ok", e);
            return false;
        }
    }
744516
def validate_credentials!
      credentials.each do |credential, value|
        next if value.nil?

        unless value.is_a?(String) || value.is_a?(::Symbol)
          raise(Error::ConfigurationError, "Invalid #{credential} specified: #{value} must be a string or symbol.")
        end
      end
    end
1281541
private function authenticateWithPassword()
    {
        if ($this->credentials->havePassword()) {
            $authCommand = new Auth();
            $authCommand->setArguments([$this->credentials->getPassword()]);
            $authResponse = $this->connection->execute($authCommand);
            $response = $authCommand->parse($authResponse);
            if ($response !== self::AUTH_SUCCESS_MESSAGE) {
                throw new AuthenticationException();
            }
        }
    }
831018
def validate_current_password(self, value):
        
        if self.instance and self.instance.has_usable_password() and not self.instance.check_password(value):
            raise serializers.ValidationError(_('Current password is not correct'))
        return value
573813
function() {
	   if(this.options.confirmPasswordField) {
	      if(this.options.confirmPasswordField.getValue() != this.getValue() ) {
	         return false;
	      }
	   }
	   return inputEx.PasswordField.superclass.validate.call(this);
	}
1244815
def validate(self, value, redis):
        '''  '''
        value = super().validate(value, redis)

        if is_hashed(value):
            return value

        return make_password(value)
702252
public AuthenticatedUser authenticate(Map<String, String> credentials) throws AuthenticationException {
		    String username = (String)credentials.get("username");
		    if (username == null) {
		      throw new AuthenticationException("'username' is missing");
		    }
		    
		    AAFAuthenticatedUser aau = new AAFAuthenticatedUser(access,username);
		    String fullName=aau.getFullName();
		    access.log(Level.DEBUG, "Authenticating", aau.getName(),"(", fullName,")");
		    
		    String password = (String)credentials.get("password");
		    if (password == null) {
		      throw new AuthenticationException("'password' is missing");
		    } else if(password.startsWith("bsf:")) {
		    	try {
					password = Symm.base64noSplit.depass(password);
				} catch (IOException e) {
					throw new AuthenticationException("AAF bnf: Password cannot be decoded");
				}
	  		} else if(password.startsWith("enc:???")) {
				try {
					password = access.decrypt(password, true);
				} catch (IOException e) {
					throw new AuthenticationException("AAF Encrypted Password cannot be decrypted");
				}
		    }
		    
		    if(localLur!=null) {
		    	access.log(Level.DEBUG, "Validating",fullName, "with LocalTaf", password); 
		    	if(localLur.validate(fullName, Type.PASSWORD, password.getBytes())) {
				    aau.setAnonymous(true);
				    aau.setLocal(true);
				    access.log(Level.DEBUG, fullName, "is authenticated locally"); 
		    		return aau;
		    	}
		    }
		    
		    String aafResponse;
		    try {
		    	access.log(Level.DEBUG, "Validating",fullName, "with AAF");//, password); 
		    	aafResponse = aafAuthn.validate(fullName, password);
			    if(aafResponse != null) { // Reason for failing.
			    	access.log(Level.AUDIT, "AAF reports ",fullName,":",aafResponse);
			    	throw new AuthenticationException(aafResponse);
			    }
			    access.log(Level.AUDIT, fullName, "is authenticated"); //,password);
			    // This tells Cassandra to skip checking it's own tables for User Entries.
			    aau.setAnonymous(true);
		    } catch (AuthenticationException ex) {
		    	throw ex;
		    } catch(Exception ex) {
	    		access.log(ex,"Exception validating user");		    		
	    		throw new AuthenticationException("Exception validating user");
		    }
		    
		    return aau; 
	  }
746132
def validate(self, value):
        
        if not isinstance(value, (str, unicode)):
            raise orb.errors.ColumnValidationError(self, 'Invalid password.')

        elif not self.__allowUnicode and value != projex.text.toAscii(value):
            raise orb.errors.ColumnValidationError(self, 'Only ASCII characters are allowed for your password.')

        elif len(value) < self.__minlength or \
                (self.__requireUppercase and not re.search('[A-Z]', value)) or \
                (self.__requireLowercase and not re.search('[a-z]', value)) or \
                (self.__requireNumber and not re.search('[0-9]', value)) or \
                (self.__requireWildcard and not re.search('[^a-zA-Z0-9]', value)):
            raise orb.errors.ColumnValidationError(self, self.rules())

        # check for invalid characters
        elif self.__invalidCharacters and re.search(self.__invalidCharacters, value):
            raise orb.errors.ColumnValidationError(self, self.__invalidCharactersRule)

        else:
            return super(PasswordColumn, self).validate(value)
959727
public static boolean isValid(String username, String password) {
        return StringUtils.isNotEmpty(username) && StringUtils.isNotEmpty(password)
                && UserWebConstant.USERMAP.containsKey(username)
                && UserWebConstant.USERMAP.get(username).getPasswordMd5().equals(password);
    }
996316
def validate_password2(self, value):
        
        if value != self.initial_data['password1']:
            raise serializers.ValidationError(_('Password confirmation mismatch'))
        return value
63537
public function authenticate(string $password): bool
    {
        $hash = $this->get('hashed_password');

        $isHashed = null !== $hash;
        if (!$isHashed) {
            // If there is no hashed password, fake verify with default hash.
            $hash = Grav::instance()['config']->get('system.security.default_hash');
        }

        // Always execute verify() to protect us from timing attacks, but make the test to fail if hashed password wasn't set.
        $result = Authentication::verify($password, $hash) && $isHashed;

        $plaintext_password = $this->get('password');
        if (null !== $plaintext_password) {
            // Plain-text password is still stored, check if it matches.
            if ($password !== $plaintext_password) {
                return false;
            }

            // Force hash update to get rid of plaintext password.
            $result = 2;
        }

        if ($result === 2) {
            // Password needs to be updated, save the user.
            $this->set('password', $password);
            $this->undef('hashed_password');
            $this->save();
        }

        return (bool)$result;
    }