I'd like to restrict access to certain areas of my site (site X) based on whether or not the user has access to certain restricted areas of another site (site Y), which is not under my control.
To be clear, the user not only needs to have valid login credentials to site Y, but their login credentials also need to give them access to a particular page which only certain users can access. Site X doesn't need anything sensitive from this site Y, it just needs to know whether the user's credentials allow them access, before proceeding to show similarly sensitive information on site X. That is to say, being able to access this restricted area of site Y also entitles them to access the sensitive information that I want to show them on site X.
Can I simply prompt the user to login to the restricted area of site Y and know whether or not their login details worked? When trying to access this restricted part of site Y, it's the browser that prompts the user for login as opposed to the site itself. Not sure if that matters or not... Thanks