0

We have a django restful api to save data in SQL Database. This API is hosted in IIS and consumed by Angular application. How to get client user name who browsed it from local machine?

There is no user model available in database.

Paras
  • 63
  • 1
  • 6
  • what do you mean by "client user name"? – dirkgroten May 21 '19 at 10:20
  • Here client user name means: My username (ParasJain) if I access the angular application and consumed Python: 'Created By' field uses Server name is stamped as an audit instead of the user name – Paras May 21 '19 at 10:36
  • but where does that username come from if it's not in the database? Where do you set your username? Maybe show us the code (django) where you process the request from the client and want to add the username. – dirkgroten May 21 '19 at 10:37
  • Users logged-in with windows credentials – Paras May 21 '19 at 10:47
  • afaik web browsers don't have access to that information. So that's not possible. – dirkgroten May 21 '19 at 10:58
  • but there might be an exception for IE/Edge: https://stackoverflow.com/questions/1441209/grab-username-from-ie-to-authenticate-against-ldap/1441494#1441494 – dirkgroten May 21 '19 at 11:01
  • But this can be doable when we have an API in c# – Paras May 21 '19 at 11:02

0 Answers0