Track users by HTTP header

Hello Piwik users,

I want to track unique users but instead of setting the UID in the javascript, I want the API server to autodetect this b/c all requests would go through our authentication system so all requests would have a custom header with the username in it. Is this easy to do?

No one has an answer for this?

Is Tracker.makeNewVisitObject the right thing for my plugin to tap into so I can set this up?