There can be many ways. However, many of them depend on control over the client, as well as on the server.
Obvious data sources include:
However, none of this explains how the value appeared in the session — it must have been implemented in PHP code.
Therefore, not knowing how this was implemented on your previous site, we cannot tell you:
- Was it safe and correctly implemented.
- behavior replication method
Given your list of resources, while it would be possible to implement authentication based on direct LDAP calls by passing the username and password through your application, I highly recommend using (e.g. openId), but restricting providers only to your openid provider - which will use MSAD as a backend.
source share