http://technotip.com/526/wordpress-username-password-for-your-application-login/

Use self hosted WordPress credentials(username and password) for authenticating your application’s user login. i.e., check the user entered username and password against the WordPress database.

In other words: If you need to see if a user entered the proper wordpress username and password OUTSIDE of the actual wordpress application, then use this code to achieve it.

source