users@glassfish.java.net

Re: authenticating against a glassfish realm is a pain

From: Joerg Gippert <jgippert_at_online.de>
Date: Mon, 28 Apr 2008 04:37:07 +0200

Hello,

after the user has been authenticated, you should be able to retrieve the
username by calling request.getRemoteUser() (see also
request.isUserInRole(), and request.getUserPrincipal()).

Hope, that helps

Regards,
Joerg
----- Original Message -----
From: <glassfish_at_javadesktop.org>
To: <users_at_glassfish.dev.java.net>
Sent: Sunday, April 27, 2008 7:58 PM
Subject: authenticating against a glassfish realm is a pain


> After many stressful hours I have worked out that j_security_check is a
> load of old horse dung and should not be used in a production environment.
>
> My main gripe is that you can not use a filter to extract the username and
> password and store them in a session object. This is a WOEFULL oversight.
> Authentication using form-based login and j_security_check is handled
> effortlessly by glassfish. However what happens if you then want to greet
> the user after she has successfully logged in? How can you then extract
> the j_username value and store it in a session object for future
> reference?
>
> There must be a better way of authenticating. please put me out of my
> misery and point me in the correct direction.
>
> One of those moments when the beauty of Glassfish is stained because of
> what can surely only be a horrendous oversight.
> [Message sent by forum member 'hughacland' (hughacland)]
>
> http://forums.java.net/jive/thread.jspa?messageID=271709
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>