[rules-users] Drools Guvnor and jboss single sign on
Paul R.
reverselogic at gmail.com
Wed Dec 9 19:05:38 EST 2009
It's very easy to create a custom authentication module for Seam. In my
organization, we've created a simple module which will check the session for
an existing user object. Just have to put it on your classpath and edit the
components.xml to use your class as its authenticator. Perhaps something
like this will work for you?
Cheers,
Paul
import org.jboss.seam.security.Identity;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.contexts.Contexts;
@Name("customAuthenticator")
public class CustomAuthenticator {
public boolean authenticate() {
User userBean = (User) Contexts.getSessionContext()
.get("SESSIONID");
if (userBean == null || userBean.getUsername() == null) {
log.info( "No Session" );
return false;
} else {
log.info( "Setting username to " + userBean.getUsername() );
Identity.instance().getCredentials().setUsername(
userBean.getUsername() );
return true;
}
}
}
2009/12/9 Sahid Khan (সাহিদ) <sahidkhn at gmail.com>
> Hello,
>
> I have couple of web applications other than Guvnor deployed in JBoss.
> I use jboss single sign on [1] for authentication. But guvnor does not
> seem to be working. I believe there are some issues with JBoss Seam
> and JBoss SSO. But is there any work around to integrate JBoss SSO
> with Guvnor? Please help.
>
> 1. http://www.jboss.org/community/wiki/JBossWebSingleSignOn
>
> Thanks in advance,
> --
> Sahid.
> Argue with idiots, and you become an idiot. - PG
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091210/c540e543/attachment.html
More information about the rules-users
mailing list