WordPress External Authentication

How difficult would it be to capture WordPress Login and Password information from the login page into a https string and send to a third party database for authentication which would return a response of Y with a name or N. Y will permit user to continue into WordPress site, and N would return a Login or Password Error.

Would this be a big effort, to redirect the authentication mechanism of WordPress?