kohsuke / libpam4j

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

PAM.authenticate should allow for mock returns #1

Closed busbey closed 11 years ago

busbey commented 11 years ago

Hi!

I'm trying to make use of this library within Spring Security. It's been awesomely easy.

One issue I've run into is that UnixUser's final class modifier makes it so I can mock it via Mockito. This makes it so I essentially can't test my code's use of the library without having access to an actual pam service.

Any chance you could make it non-final?

kohsuke commented 11 years ago

Done.

siva-chandrasekaran commented 8 years ago

Hi Busbey - Do you have a sample code to use PAM authenticate with Spring Security? Thanks!

busbey commented 8 years ago

Nope. Haven't looked at any of the PAM stuff in ~3 years.