dabloem/yubico-java-client — comment on commit ea24cea0af32a8221a85135a53bb12a5947b4452
File:  line 0
By dabloem:

Hi Fredrik,

I wasn't expecting that you accept my pull request, I just wanted to let
you know that the LoginModule doesn't work for Glassfish and show you an
example.
Glassfish uses a realm providing information for a standard LoginModule, my
code is just a gist. ;-)

When a LoginModule uses the callback handler to retrieve credentials, the
webbrowser receives yet another login dialog, because Glassfish has already
stored the credentials in the Realm. A (new) call to callbackHandler.handle
is considered as new attempt to get the credentials from the user.

My code uses the realm to get the username/password for verification,
instead of callbackHandler.handle(new Callback[] { nameCb, mv_passCb })

May I ask something different, what do you consider as a best practice to
get the user roles when using yubikey?

Thanks,
Duncan

On Wed, Nov 30, 2011 at 5:11 PM, Fredrik Thulin <
reply@reply.github.com
> wrote:

> Thank you for your interest in the Yubico Java client.
>
> I'm unhappy to have to bring this issue up, but a lot of statements in
> your patch very much looks like they are copied straight from
> YubikeyLoginModule.java, but the Copyright notice at the top of the file
> has been removed. If your work is derived from ours, you have to keep the
> copyright header. You may add your own copyright covering the parts you've
> written (and you have to clearly identify those).
>
> You hard code client id (4711) in your code, which indicates it is not
> feature complete.
>
> I don't really follow the differences between GlassFish's realm thingy,
> and the YubikeyToUserMap scheme. Couldn't the Realm functionality be
> implemented as an implementation of YubikeyToUserMap?
>
> Thanks.
>
> /Fredrik
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/dabloem/yubico-java-client/commit/ea24cea0af32a8221a85135a53bb12a5947b4452#commitcomment-758127
>