Closed Bug 625347 Opened 14 years ago Closed 13 years ago

Improve the authentication interface

Categories

(Cloud Services :: Server: Core, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 659155

People

(Reporter: tarek, Unassigned)

References

Details

From bug 625001 > Comment on attachment 503127 [details] [diff] [review] > Make sure the password_reset API is public > > + user_name = request.sync_info['username'] > + user_id = self.auth.get_user_id(user_name) > + user_name, user_email = self.auth.get_user_info(user_id) > > This trio is a little weirdly loopy, though I understand why. Perhaps we should > just add a get_user_email into auth. > This is not optimal for sure. Another solution would be to add an optional "fields" argument to get_user_info() ala ldapsearch, to filter out the fields we want to get back: user_email = self.auth.get_user_info(user_id, fields=['email']) This can be useful as long as we're able to define a generic list of fields for the user, every backend can translate to its own internal representation.
This would work. For now, I'd just leave it until we have more idea what else might get packed in. The code there works (though I might go with __, user_email to raise fewer eyebrows)
(In reply to comment #1) > This would work. For now, I'd just leave it until we have more idea what else > might get packed in. The code there works Sure. > (though I might go with __, user_email to raise fewer eyebrows) Yeah that's what I ended up doing for clarity
A user object is coming up, we'll be bale to use (bug 659155)
Depends on: 659155
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.