Vector Posted January 4, 2021 Share Posted January 4, 2021 Добрый всем... Метод UniApplication->UniSession->GetSystemUser(); возвращает, как понимаю, пользователя, от имени которого запущено приложение. Есть ли возможность узнать имя пользователя, открывшего - web страницу этого приложения. Как это можно сделать ? Без дополнительной авторизации. Спасибо. Quote Link to comment Share on other sites More sharing options...
x11 Posted January 4, 2021 Share Posted January 4, 2021 Вы должны понимать, что веб-браузер ничего вам не даст. Максимум, что вы можете получить от браузера, это user-agent и разрешение экрана или даже не экрана, а окна браузера. Скоро браузеры и user-agent перестанут отдавать. https://habr.com/ru/company/dcmiran/news/t/494362/ Quote Link to comment Share on other sites More sharing options...
x11 Posted January 4, 2021 Share Posted January 4, 2021 Фактически, вам нужно имя пользователя, под которым работает браузер. Может вы просто озвучите конечную задачу, что именно в итоге требуется получить/сделать/реализовать. Quote Link to comment Share on other sites More sharing options...
Vector Posted January 4, 2021 Author Share Posted January 4, 2021 Ну, удаленный IP то есть UniApplication->RemoteAddress. Так что, без вариантов ? Quote Link to comment Share on other sites More sharing options...
x11 Posted January 4, 2021 Share Posted January 4, 2021 На удаленном IP за NAT`ом, может сидеть не один пользователь. 10, 20, 100? И все они будут на одном IP. Quote Link to comment Share on other sites More sharing options...
Vector Posted January 4, 2021 Author Share Posted January 4, 2021 Именно, да пользователь, под которым работает браузер, пользователь, вошедший в компьютер. Фактически нужна проверки членства пользователя в группе Active Directory. И если нет - не пущать. Проверку я сделал, это как раз работает. Нужно теперь имя входа. Можно сделать ещё раз авторизацию, но ведь пользователь уже зашёл один раз на комп. Не хотелось бы повторяться. Quote Link to comment Share on other sites More sharing options...
Vector Posted January 4, 2021 Author Share Posted January 4, 2021 Локальная сеть, все прозрачно по поводу IP, наружу не выставляем. Quote Link to comment Share on other sites More sharing options...
x11 Posted January 4, 2021 Share Posted January 4, 2021 Нужно ковырять Internet explorer, может он умеет работать с AD. Если вообще, приложение будет нормально работать с этим браузером. Ну и в конце концов, пусть пользователь сам вводит свои виндовые логин/пароль. Quote Link to comment Share on other sites More sharing options...
x11 Posted January 4, 2021 Share Posted January 4, 2021 можно погуглить на тему: firefox active directory user name firefox NTLM user name firefox auth active directory но может же быть и другой браузер... Quote Link to comment Share on other sites More sharing options...
x11 Posted January 4, 2021 Share Posted January 4, 2021 вот, что-то здесь есть вроде https://developer.mozilla.org/en-US/docs/Mozilla/Integrated_authentication https://superuser.com/questions/664656/how-to-configure-firefox-for-ntlm-sso-single-sign-on https://winitpro.ru/index.php/2012/02/21/ntlm-autentifikaciya-v-firefox/ Quote Link to comment Share on other sites More sharing options...
Tokay Posted January 4, 2021 Share Posted January 4, 2021 6 hours ago, Vector said: Как это можно сделать никак. потому как дыра. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.