M
M
Maxim2014-05-28 08:38:33
PHP
Maxim, 2014-05-28 08:38:33

Is it possible to implement two types of authorization on the same domain?

The situation is this, there is a site on which there are two groups of users, now everyone logs in using the login \ password form, you need to do the following:
for those users who have certificates - log in using ssl certificates (just press the login button),
for everyone else - leave standard form of authorization by login\password.
The site is powered by drupal 7.
Is it possible to organize authentication by SSL certificates and standard (login\password) on the same domain?
UPD: the option to create a subdomain is possible

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kubintsev, 2014-05-28
@akubintsev

I would make a subdomain that would work exclusively through SSL and be responsible for authenticating client certificates. It is convenient because it is easy to perform using nginx. And then you can authorize on it, following the example from here cweiske.de/tagebuch/ssl-client-certificates.htm, and set a session cookie for the parent domain.
UPD: if there is a desire to drive all authentication to a subdomain, then nothing fundamentally changes, only instead of the 443rd port, the 80th port will still be listened to and, accordingly, the php handler will look at the presence of fields in the $_SERVER environment to select the authorization method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question