[JBoss Portal] - Re: Calling JAAS
by indyJones
ok...I need some help...
JBoss AS: 4.0.5
JBoss Portal: 2.6.1
What I am trying to do
--------------------------
Create a JSF portlet that takes a User name and password from a user and authenticates the User through the JAAS framework. This would also include setting the context path to "/auth" after the User has been authenticated.
What is the ClienteCallbackHandler class used in the examples above? Is this something standard in the JAAS framework? Is this just the IdentityLoginModule? (Sorry, very new to JAAS)
I have looked through the source code and for the life of me can not find any help setting the context path correctly after the user is authenticated.
I have looked through the Permission Factory code....but i am just lost...
Any help would be very appreciated...
Thanks
indy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071698#4071698
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071698
18Â years, 8Â months
[JBoss Seam] - DataModelSelection is null
by ilya78
I have a page that should display a list of most recent events ocured. By clicking on each event some information should be displayed about the event.
I am using a DataModel to display the list, but the problem is that after clicking an item, the DataModelSelection is null.
I have made a simplified example, in order to show the problem:
| @Name("eventComponent")
| @Scope(ScopeType.EVENT)
| public class MyLatestAction {
|
| @In FacesMessages facesMessages;
|
| @DataModel(value="eventList")
| private List<Integer> eventList;
|
| @DataModelSelection
| private Integer selectedEvent;
|
| @Factory("eventList")
| public void initRequestList() {
| eventList = new ArrayList<Integer>();
| eventList.add(1);
| eventList.add(2);
| eventList.add(3);
| }
| public void selectEvent() {
| facesMessages.add("selected event: "+selectedEvent);
| }
|
| }
|
the view eventList.xhtml contains this code:
| ...
| <h:messages globalOnly="true" styleClass="message"/>
|
| <h:dataTable value="#{eventList}" var="item" >
| <h:column>
| <f:facet name="header">Event</f:facet>
| <s:link action="#{eventComponent.selectEvent}" value="#{item}"/>
| </h:column>
| </h:dataTable>
|
| ...
|
I am accessing the page from the menu with a link like this:
| <s:link view="/eventList.xhtml" value="Event List"/>
|
The problem is that even though the page correctly displays the list of events (1, 2, 3), when I select an event, in the bean the selection is null (it prints "selcted event: null"
What am I doing wrong
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071696#4071696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071696
18Â years, 8Â months
[JBoss Portal] - Re: Cannot retrieve user: Unable to locate current JTA trans
by kpalania
"sohil.shah(a)jboss.com" wrote : ah ok-
|
| I understand your situation now.
|
| Ok in this case you have no choice but to go the Tomcat Valve/Custom Authenticator route.
|
| This is the only place you can actually grab hold of the Tomcat Session and populate it with the Subject/Principals that will be propagated through to Portal.
|
| Basically you have to simulate what the container managed security is doing inside of your own code, and not use container managed security.
|
| The sample interaction would be something like:
|
| 1/ You have a Tomcat Valve that post-processes the request on your Authentication Servlet
|
| 2/ In this Post Processing, it will grab information populated by the Servlet and populate the Principal/Subject just the way the container does for Portal when using standard JAAS mechanism
|
| For a look at how this is done, look at the Authenticator source code of Tomcat and you will be very much enlightened ;)
|
| Thanks
Thanks Sohil. Let me look into the Tomcat source code and see if I can do something similar to get this working. Will let you know how goes by COB and hopefully, it goes well....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071691#4071691
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071691
18Â years, 8Â months