when user logs in to his desktop windows os authenticates him against Active Directory Server. so Whenever he accesses a web page he should not be thrown a login page for entering his userid or password.Instead, his userid and domain need to be captured from his desktop and passed to the web server.(let him enter password after that)
Is this possible in python to get username and domain of of client? win32api.GetUserName() gives the username of the server side.
Thanks in advance
score:-1
This sounds like a javascript question to me. I think you'll have to add javascript to your login page that attempts to access the details and returns them to the server.
I would have thought that there would be security measures to prevent this, however this question suggests others have managed something similar.
UPDATE
It looks like there might be some useful information in the django docs
score:0
Hmm... what you probably want to do is use Django's RemoteUserMiddleware and leave user authentication to the Web Server which can then be configured to handle it. The solution from Ntlm/Kerberos authentication in Django should work, but as mentioned it's a bit quirky - not all browsers support it correctly, and you have to modify browser settings for it to work.
score:0
What you want to do is called Single sign on (SSO) and it's much easier to implement on actual web server than Django.
So, you should check how to do SSO on Apache/Nginx/whateverYouAreUsing, then the web server will forward the authenticated username to your django app.
Credit To: stackoverflow.com
Related Query
- how to get username and domain of windows logged in client using python code?
- How to access and configure postgresql database from python django on Windows 7 using a command CMD
- How to get Django 1.7 working on Ubuntu 14.04 with nginx and virtualenv using python 2.7 while having python 3.4 installed?
- How to get a file from a network windows directory and move to my Python Django project directory?
- How to get HTML filed value without using form using Django and Python
- How to get slope of variables and intercept from a stored(serialized using python pickle) ML model
- How do I bypass asking end-user for username while adding a blog post using a form and automatically display logged in user as post author?
- How to run python script in html using django and get variable from html input form
- How to get an app name using python in django
- Using python multiprocessing Pool in the terminal and in code modules for Django or Flask
- How can I get tox and poetry to work together to support testing multiple versions of a Python dependency?
- how to get user email with python social auth with facebook and save it
- How do I reply to an email using the Python imaplib and include the original message?
- How to get Interdependent dropdowns in django using Modelform and jquery?
- Django authenticate using logged in windows domain user
- How to get a response of multiple objects using rest_framework and Django
- How do I get the first name and last name of a logged in user in Django?
- How to mock in python and still allow the actual code of mocked function to execute
- How do I get new Database changes since last login using Django and Python?
- AWS ECS using docker and ngnix, how to get my nginx config into the container?
- How do I install MySQL and the Python MySQL package on OS X Leopard? Or how do I learn about being a web developer using OS X?
- How to get APIViews and ViewSets to show on API Root when using Router with Django REST Framework?
- How to write code that works in both Python 2 and Python 3?
- Using Cheetah Templating system with windows and python 2.6.1 (namemapper problem)
- How to send event to client from any place of server using django channels and websockets
- How to set different permission_classes for GET and POST requests using the same URL?
- How to validate a webhook signature using python and openssl
- How to use Django channels to push newly created data to client side without reloading and not completely changing the existing normal view code
- How to authenticate ngrok password automatically using Python and or Javascript?
- How to get the aws s3 object key using django-storages and boto3
More Query from same tag
- Error when inheriting an abstract class with foreign keys
- How to access foreign key table's data in Django templates?
- django sitemap DoesNotExist at /sitemap.xml
- ExtJS 4.0 Grid Date Column and Form Date Field (browser timezone issues)
- Customizing a Django Form Field in Admin Based on Value
- Python Requests library post interpreted by Django as GET for some reason
- Celery Deadlock when saving data in Django, why?
- How can I configure the Django DATABASES settings at runtime?
- Django delete cache with specific key_prefix
- Override save method of Django Admin
- How do I add Chrome Extension to django-cors-headers whitelist?
- TypeError: expected str, bytes or os.PathLike object, not ImageFieldFile
- AssertionError: Cannot apply DjangoModelPermissionsOrAnonReadOnly on a view that does not set `.queryset` or have a `.get_queryset()` method
- Django query which calculate most active post by like and dislike, and by each category
- Unable to get all the fields of a model when we alter the table manually