Re: Custom authentication for Jetspeed2

David Sean Taylor <[email protected]>
Newsgroups gmane.comp.jakarta.jetspeed.user
Message-ID <[email protected]>
On Dec 22, 2011, at 8:49 AM, pierounix wrote:

> 
> Hi all, this is my first post and my first experience with portlet too. 
> I am using Jetspeed 2 for a portlet application and I need to have my custom
> authentication (also custom roles). I have my own database for users, I'm
> using MYSQL. 
> Can you tell me which classes exactly I have to write/modify from
> jetspeed-security library?? 

Depends how tightly you want to integrate with Jetspeed security management. If you are going to use Jetspeed to manage your users and roles, then read up on providing your own security providers here:

http://portals.apache.org/jetspeed-2/devguide/atn.html
http://portals.apache.org/jetspeed-2/devguide/atn-spi.html

If you already have your own User management system, then you will only need to integrate authentication and role checks. In that case follow the pattern of providing a custom filter and jetspeed valve to populate the required Jetspeed subject in the request

http://portals.apache.org/jetspeed-2/guides/guide-tomcat-sso-cross-context-j2-realm.html
http://portals.apache.org/jetspeed-2/deployguide/config-sso.html

If you can get a subject populated in your custom filter, Jetspeed will make use of that subject throughout the code. We have an example of a custom portal filter that does not use a Login Module, see the configuration here (its the same as the Websphere section):

http://portals.apache.org/jetspeed-2/deployguide/guide-aggregation.html

Or, you can write your own Login Module.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.