You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by kranthi kumar <kr...@gmail.com> on 2008/10/24 12:03:34 UTC

Roller Login

Hi,
      I am trying roller for blogs in my site. I am developing my site in
Flex2+java and i am having a link in the site clicking on which will take
the user to the roller login page. Now my problem is i want the user to
directly login into his blog using the same credentials which the user uses
to login into my site(I dont want separate credentials for roller and my
site). I dont want roller to be as a separate entity.It should be as an
integral part of my site as far as the login is concerned. Is this
possible???? If it is possible then what are the changes that i need to
do???? Please advise me.
Thanks
Kranthi Kumar.Chamarthi
-- 
View this message in context: http://www.nabble.com/Roller-Login-tp20147436s12275p20147436.html
Sent from the Roller - User mailing list archive at Nabble.com.


Re: Roller Login

Posted by kranthi kumar <kr...@gmail.com>.
Hi rumirunto,
                 Thank you very much for the reply. But problem is i don't
have the idea about the architecture and coding of Roller. In order to make
the changes that you mentioned i need a good understanding of Roller's
coding. So what should i do to get a better understanding about Roller. The
build that i downloaded is of roller4 and it doesn't contain the sorce files
..It contains only class files.Please advise me.
Thanks
Kranthi Kumar

rumirunto wrote:
> 
> Hello Kranthi,
> 
> I recently implemented single-sign-on for roller on our website.
> I disabled roller's login/logout pages, and redirected them to our
> site's custom login system.  Then, on our login, I added code
> to add a name/value pair of sessionID/userID into a "shared_users" 
> hashtable shared by both the main and the blog contexts. (see code below)
> 
> I then created an LHProcessingFilter class that finds the root context's
> session ID, and looks it up in the shared hashtable. This tells you if a
> user session is logged in or not.
> 
> Our ACEGI filter chain is:
> 
> httpSessionContextIntegrationFilter,lhProcessingFilter,remoteUserFilter,channelProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
> 
> Added an LHAuthenticationProvider class as an authenication provider,
> and bingo...
> 
> Of course, there are other tweaks elsewhere for logouts and such, 
> but the above is the main idea.
> 
> Good luck.
> 
>     --G
> 
> 
> -------------------------------------------------------------------
> ServletContext ctx = session.getServletContext().getContext("/blog");
> if (ctx!=null) {
>     Hashtable shareddata = (Hashtable)ctx.getAttribute("shared_users");
>     if (shareddata==null) {
>         shareddata = new Hashtable();
>     }
>     if (visItem.loggedin) {
>         shareddata.put(session.getId(), Integer.toString(visItem.id));
>     } else {
>         shareddata.remove(session.getId());
>     }
>     ctx.setAttribute("shared_users", shareddata);
> }
> -------------------------------------------------------------------
> 
> 
> 
> On Fri, Oct 24, 2008 at 03:03:34AM -0700, kranthi kumar wrote:
>> 
>> Hi,
>>       I am trying roller for blogs in my site. I am developing my site in
>> Flex2+java and i am having a link in the site clicking on which will take
>> the user to the roller login page. Now my problem is i want the user to
>> directly login into his blog using the same credentials which the user
>> uses
>> to login into my site(I dont want separate credentials for roller and my
>> site). I dont want roller to be as a separate entity.It should be as an
>> integral part of my site as far as the login is concerned. Is this
>> possible???? If it is possible then what are the changes that i need to
>> do???? Please advise me.
>> Thanks
>> Kranthi Kumar.Chamarthi
>> -- 
>> View this message in context:
>> http://www.nabble.com/Roller-Login-tp20147436s12275p20147436.html
>> Sent from the Roller - User mailing list archive at Nabble.com.
>> 
> 
> -- 
> Guillermo Payet
> L O C A L H A R V E S T
> http://www.localharvest.org
> 
> 

-- 
View this message in context: http://www.nabble.com/Roller-Login-tp20147436s12275p20260478.html
Sent from the Roller - User mailing list archive at Nabble.com.


Re: Roller Login

Posted by Guillermo Payet <gp...@localharvest.org>.
I should have added that LHProcessingFilter gets the root
context's session ID from the user's cookies.  (Tomcat session ID)


On Fri, Oct 24, 2008 at 12:14:56PM -0700, Guillermo Payet wrote:
> Hello Kranthi,
> 
> I recently implemented single-sign-on for roller on our website.
> I disabled roller's login/logout pages, and redirected them to our
> site's custom login system.  Then, on our login, I added code
> to add a name/value pair of sessionID/userID into a "shared_users" 
> hashtable shared by both the main and the blog contexts. (see code below)
> 
> I then created an LHProcessingFilter class that finds the root context's
> session ID, and looks it up in the shared hashtable. This tells you if a
> user session is logged in or not.
> 
> Our ACEGI filter chain is:
> 
> httpSessionContextIntegrationFilter,lhProcessingFilter,remoteUserFilter,channelProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
> 
> Added an LHAuthenticationProvider class as an authenication provider,
> and bingo...
> 
> Of course, there are other tweaks elsewhere for logouts and such, 
> but the above is the main idea.
> 
> Good luck.
> 
>     --G
> 
> 
> -------------------------------------------------------------------
> ServletContext ctx = session.getServletContext().getContext("/blog");
> if (ctx!=null) {
>     Hashtable shareddata = (Hashtable)ctx.getAttribute("shared_users");
>     if (shareddata==null) {
>         shareddata = new Hashtable();
>     }
>     if (visItem.loggedin) {
>         shareddata.put(session.getId(), Integer.toString(visItem.id));
>     } else {
>         shareddata.remove(session.getId());
>     }
>     ctx.setAttribute("shared_users", shareddata);
> }
> -------------------------------------------------------------------

Re: Roller Login

Posted by Guillermo Payet <gp...@localharvest.org>.
Hello Kranthi,

I recently implemented single-sign-on for roller on our website.
I disabled roller's login/logout pages, and redirected them to our
site's custom login system.  Then, on our login, I added code
to add a name/value pair of sessionID/userID into a "shared_users" 
hashtable shared by both the main and the blog contexts. (see code below)

I then created an LHProcessingFilter class that finds the root context's
session ID, and looks it up in the shared hashtable. This tells you if a
user session is logged in or not.

Our ACEGI filter chain is:

httpSessionContextIntegrationFilter,lhProcessingFilter,remoteUserFilter,channelProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor

Added an LHAuthenticationProvider class as an authenication provider,
and bingo...

Of course, there are other tweaks elsewhere for logouts and such, 
but the above is the main idea.

Good luck.

    --G


-------------------------------------------------------------------
ServletContext ctx = session.getServletContext().getContext("/blog");
if (ctx!=null) {
    Hashtable shareddata = (Hashtable)ctx.getAttribute("shared_users");
    if (shareddata==null) {
        shareddata = new Hashtable();
    }
    if (visItem.loggedin) {
        shareddata.put(session.getId(), Integer.toString(visItem.id));
    } else {
        shareddata.remove(session.getId());
    }
    ctx.setAttribute("shared_users", shareddata);
}
-------------------------------------------------------------------



On Fri, Oct 24, 2008 at 03:03:34AM -0700, kranthi kumar wrote:
> 
> Hi,
>       I am trying roller for blogs in my site. I am developing my site in
> Flex2+java and i am having a link in the site clicking on which will take
> the user to the roller login page. Now my problem is i want the user to
> directly login into his blog using the same credentials which the user uses
> to login into my site(I dont want separate credentials for roller and my
> site). I dont want roller to be as a separate entity.It should be as an
> integral part of my site as far as the login is concerned. Is this
> possible???? If it is possible then what are the changes that i need to
> do???? Please advise me.
> Thanks
> Kranthi Kumar.Chamarthi
> -- 
> View this message in context: http://www.nabble.com/Roller-Login-tp20147436s12275p20147436.html
> Sent from the Roller - User mailing list archive at Nabble.com.
> 

-- 
Guillermo Payet
L O C A L H A R V E S T
http://www.localharvest.org

Re: Roller Login

Posted by kranthi kumar <kr...@gmail.com>.
Can you provide me with the link for the CVS where the customize user model
will be found...
Thanks
Kranthi

cn kene wrote:
> 
> It is heard that roller has a customize user model, but I do not know why
> it
> is not released now, it can be found in CVS I think.
> 
> 
> 
> 2008/10/24 kranthi kumar <kr...@gmail.com>
> 
>>
>> Hi,
>>      I am trying roller for blogs in my site. I am developing my site in
>> Flex2+java and i am having a link in the site clicking on which will take
>> the user to the roller login page. Now my problem is i want the user to
>> directly login into his blog using the same credentials which the user
>> uses
>> to login into my site(I dont want separate credentials for roller and my
>> site). I dont want roller to be as a separate entity.It should be as an
>> integral part of my site as far as the login is concerned. Is this
>> possible???? If it is possible then what are the changes that i need to
>> do???? Please advise me.
>> Thanks
>> Kranthi Kumar.Chamarthi
>> --
>> View this message in context:
>> http://www.nabble.com/Roller-Login-tp20147436s12275p20147436.html
>> Sent from the Roller - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Roller-Login-tp20147436s12275p20262392.html
Sent from the Roller - User mailing list archive at Nabble.com.


Re: Roller Login

Posted by cn kene <ke...@gmail.com>.
It is heard that roller has a customize user model, but I do not know why it
is not released now, it can be found in CVS I think.



2008/10/24 kranthi kumar <kr...@gmail.com>

>
> Hi,
>      I am trying roller for blogs in my site. I am developing my site in
> Flex2+java and i am having a link in the site clicking on which will take
> the user to the roller login page. Now my problem is i want the user to
> directly login into his blog using the same credentials which the user uses
> to login into my site(I dont want separate credentials for roller and my
> site). I dont want roller to be as a separate entity.It should be as an
> integral part of my site as far as the login is concerned. Is this
> possible???? If it is possible then what are the changes that i need to
> do???? Please advise me.
> Thanks
> Kranthi Kumar.Chamarthi
> --
> View this message in context:
> http://www.nabble.com/Roller-Login-tp20147436s12275p20147436.html
> Sent from the Roller - User mailing list archive at Nabble.com.
>
>