how to change a user password while checking the current password in oracle? In my application I have a change password form which users enter their current password and the new password. Then I change their password using the following command:

alter user user_name identified by new_password;


My problem is that I don't know how to check whether the current password which the user has been entered in the form is correct or not ( as the passwords are encrypted in oracle)

How should I do this?
11g and higher accept this syntax:
ALTER USER username IDENTIFIED BY new_password REPLACE old_password;