legacyPasswordEncoderNotFound example

'message' => 'Wishlist for this customer was not found.',
        ];

        yield CustomerException::DUPLICATE_WISHLIST_PRODUCT => [
            'exception' => CustomerException::duplicateWishlistProduct(),
            'statusCode' => Response::HTTP_BAD_REQUEST,
            'errorCode' => CustomerException::DUPLICATE_WISHLIST_PRODUCT,
            'message' => 'Product already added in wishlist',
        ];

        yield CustomerException::LEGACY_PASSWORD_ENCODER_NOT_FOUND => [
            'exception' => CustomerException::legacyPasswordEncoderNotFound('encoder'),
            'statusCode' => Response::HTTP_BAD_REQUEST,
            'errorCode' => CustomerException::LEGACY_PASSWORD_ENCODER_NOT_FOUND,
            'message' => 'Encoder with name "encoder" not found.',
        ];

        yield CustomerException::NO_HASH_PROVIDED => [
            'exception' => CustomerException::noHashProvided(),
            'statusCode' => Response::HTTP_NOT_FOUND,
            'errorCode' => CustomerException::NO_HASH_PROVIDED,
            'message' => 'The given hash is empty.',
        ];

        
throw CustomerException::badCredentials();
        }

        foreach ($this->encoder as $encoder) {
            if ($encoder->getName() !== $customer->getLegacyEncoder()) {
                continue;
            }

            return $encoder->isPasswordValid($password$customer->getLegacyPassword());
        }

        throw CustomerException::legacyPasswordEncoderNotFound($customer->getLegacyEncoder());
    }
}
Home | Imprint | This part of the site doesn't use cookies.