users@glassfish.java.net

Re: Programmatic Login - No Credential Exception

From: Kumar Jayanti <v.b.kumar.jayanti_at_oracle.com>
Date: Mon, 11 Apr 2011 11:50:48 +0530

On 11-Apr-2011, at 11:46 AM, forums_at_java.net wrote:

> I'm sorry for keeping you waiting so long. Indeed using glassfish version of
> appclientlogin.conf solved problem with 'No credential Exception', so big
> thanks for that. After a few tests another problem came to my attention. I
> noticed that ProgrammaticLogin ignores provided realm name and uses glassfish
> default realm. I managed to switch bean realm using sun-ejb-jar.xml. I wonder
> if is there any simple way to dynamically switch realm from client code?

NO. It is generally not a good idea for the client to dictate which realm it wants to authenticate against. Instead the server should enforce the realm in which the client should be authenticated.


> Thank you for your help in advance.
>
> --
>
> [Message sent by forum member 'lhanusiak']
>
> View Post: http://forums.java.net/node/789029
>
>