Wednesday, 15 February 2012

java ee - How to list all user principals from realm in an application server (glassfish)? -


I have a Java EE6 application, where every user has their own JPA organization. Since I want to create these entities when the application is deployed on the server then I need a way to list all the principals or at least names. Is there any standard way to get user names in all application servers, or if there is no way for a glassfish?

My backup scheme is to create an Entry on a user's first login, but I would really like to do it first so that a user can modify user entities before the user logs in first time.

Thanks / Raphael

This is not possible. An area or (Jaspic) authentication module can connect to any authentication provider like an LDAP server or an OAuth provider. With a social network like Google or Facebook in particular, you can not expect to retrieve the list of all available users,

Because of this universal connectivity, such a method can not be made available in the standard API is.

No comments:

Post a Comment