You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Joachim Müller <jo...@wemove.com> on 2006/06/19 12:30:54 UTC

hook into the login process

Hi.

I need to do some initialization stuff right after the login. Is there
an simple way to do this?

Otherwise I would propose to introduce a LoginPostProcessValve inside an
after-login-pipline and execute this in the LoginRedirectorServlet
(similar to the login-pipeline execution in the LoginServlet).

Any thoughts?

(I am looking at the codebase 2.0.1)

Joachim

-- 

. frankfurt am main, 26°c, die gefühlte temperatur
  liegt bei 27°c. zur zeit ein wenig bewölkt
  gewitterwolken in 853 m. die sichtweite reicht
  weiter als 10 km.

< joachim müller
  joachim@wemove.com
  t +49 69 759003 11

  wemove digital solutions GmbH
  www.wemove.com



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: hook into the login process

Posted by Joachim Müller <jo...@wemove.com>.
working with 2.0.1 code this cannot be done:

the LoginConstant session attributes are not available after successful
login:

- The normal jetspeed pipeline is executed during the login process
after the execution of the LoginRedirectorServlet

- the session attributes are deleted by the LoginRedirectorServlet

- the subject in the request, after successful login, correspond to the
principal

Joachim


David Sean Taylor wrote:
> Joachim Müller wrote:
>> Hi.
>>
>> I need to do some initialization stuff right after the login. Is there
>> an simple way to do this?
>>
>> Otherwise I would propose to introduce a LoginPostProcessValve inside an
>> after-login-pipline and execute this in the LoginRedirectorServlet
>> (similar to the login-pipeline execution in the LoginServlet).
>>
>> Any thoughts?
>>
>> (I am looking at the codebase 2.0.1)
>>
>> Joachim
>>
> Have  you seen  the loginValidationValve?
> You could do something similiar
> Use the loginValidation as a template to write your own
> It short circuits on the user principal being avail
> and then a session var:
> if ( request.getRequest().getUserPrincipal() == null )
> {
>    if ( request.getSessionAttribute(LoginConstants.RETRYCOUNT) != null )
> 
> if you have a user principal, implies a login was successful
> whereas the Subject can hold the guest(anon) user
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 


-- 

. frankfurt am main, 19°c, zur zeit ein wenig
  bewölkt in 213 m. die sichtweite reicht 9.0 km.

< joachim müller
  joachim@wemove.com
  t +49 69 759003 11

  wemove digital solutions GmbH
  www.wemove.com



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: hook into the login process

Posted by David Sean Taylor <da...@bluesunrise.com>.
Joachim Müller wrote:
> Hi.
> 
> I need to do some initialization stuff right after the login. Is there
> an simple way to do this?
> 
> Otherwise I would propose to introduce a LoginPostProcessValve inside an
> after-login-pipline and execute this in the LoginRedirectorServlet
> (similar to the login-pipeline execution in the LoginServlet).
> 
> Any thoughts?
> 
> (I am looking at the codebase 2.0.1)
> 
> Joachim
> 
Have  you seen  the loginValidationValve?
You could do something similiar
Use the loginValidation as a template to write your own
It short circuits on the user principal being avail
and then a session var:
if ( request.getRequest().getUserPrincipal() == null )
{
    if ( request.getSessionAttribute(LoginConstants.RETRYCOUNT) != null )

if you have a user principal, implies a login was successful
whereas the Subject can hold the guest(anon) user

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org