users@glassfish.java.net

JAAS Login Possibilties with JSF

From: <glassfish_at_javadesktop.org>
Date: Wed, 16 Apr 2008 07:29:24 PDT

Hi all,

I have a general question:
Which possibilities of Container-Managed Authentication and Authorization (JAAS)-Login methods does one have?

First of all, my initial situation:
I want a costum JSF Login Page, where user can login and will then be redirected (by JSF navigation rules) to a certain page... where the crediantials should be matched against a jdbc-realm (com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm)

I tried out FORM based authentication (J_security_check), but this lacks the feature of redirecting a user to another page then previously accessed...

So, what other options do I have?

Are the following classes of interest?
-javax.security.auth.login.LoginContext
-com.sun.enterprise.security.LoginContext

The perfect solution would be to write an own Login-Module (realised as JSF-managed-bean) that does the login on its own:
~ look up the costum JDBCRealm which i created with the admin gui
~ login with userid and password (derived from the h:form)

the login method should be called by h:commandButton id="submit" action="{SecBean.login}" ...>

Is this possible? if yes, how?!

Thanks in advance...

Can
[Message sent by forum member 'callisto79' (callisto79)]

http://forums.java.net/jive/thread.jspa?messageID=269489