kohsuke / libpam4j

libpam4j
http://libpam4j.kohsuke.org/
MIT License
44 stars 47 forks source link

Allows for mocking returned user objects and make local info optional #3

Closed busbey closed 11 years ago

busbey commented 11 years ago

Allows for mock user objects from PAM.authenticate

Changes UnixUser to be a subclass of the generic AuthenticatedUser.

Non-backwards compatible because of the method signature change on PAM.authenticate.

Also properly checks that user exists locally before trying to use libc to get additional information.

kohsuke commented 11 years ago

I'm afraid I can't take this change as-is because of the backward breaking nature of it.

If the goal is to mock this, I can remove final from the UnixUser class and give you protected constructor to allow you set all fields. Would that do?

kohsuke commented 11 years ago

I now saw your issue #1. Since I've fixed this that way, I'm closing this.