You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paula Estrella <pa...@yahoo.com.ar> on 2006/04/10 15:15:20 UTC

authentication block problem

Hi, I'm using (or trying to use) the authentication block included in  cocoon and it works fine if there's only 1 user logged in, but when I  try to log in twice with different user names (i.e. I want many users  logged in at the same time)   I get the error  "org.apache.cocoon.ProcessingException: User is already authenticated  using handler: portal-handler".
  
  Now, my question is: how can I allow several users logged in at the same time using this auth. block?
  
  Thanks in advance,
  Paula
  
  Here's the sitemap I'm using (it's basically a copy&paste from the block example)
  
  <map:component-configurations>
        <authentication-manager>
          <handlers>
               <handler name="portal-handler">
                  <redirect-to  uri="cocoon:/login"/>     
              <authentication uri="cocoon:raw:/authenticate"/>
            </handler>
          </handlers>
        </authentication-manager>
      </map:component-configurations>
  
  <map:match pattern="login">
   <map:generate src="docs/login.xml"/>
          <map:transform src="styles/simple-page2html.xsl"/>
          <map:transform type="encodeURL"/>
          <map:serialize/>
        </map:match>
  
   <map:match pattern="do-login">
              <map:act type="auth-login">
            <map:parameter name="handler" value="portal-handler"/>
             <map:parameter name="parameter_name"  value="{request-param:username}"/>
             <map:parameter name="parameter_password"  value="{request-param:password}"/>
            <map:redirect-to  uri="portal"/>  
            </map:act>
          <map:redirect-to uri="error"/>
        </map:match>

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: authentication block problem

Posted by Paula Estrella <pa...@yahoo.com.ar>.
Hi, yes with the same instance of mozilla I expected that but not with different instances! anyway, thanks for your answers!
  Paula

Simone Gianni <s....@thebug.it> escribió:                  Hi Paula,
  AFAIK in IE it works like this :
  - If you start another browser instance (by clicking on  start->Internet explorer) then you don't take the cookies from  another running instance.
 - If you open another window of the  browser (by typing CTRL+N, or file->new->window, or clicking on a  link that opens another window) then you have all the cookies of the  "main" window.
  
 While in Firefox it does not matter if you  launch a new instance or open another window or tab, cookies are always  shared (don't know if there is a configuration option).
  
  So, you should try to open a new window in internet explorer by typing  CTRL+N, in this case it should behave same as firefox.
  
  To test concurrency on a web application is always better to use two  different computers, since also IE in rare and strange cases (i can't  remember, something to do with HTTPS, P3P) and in some versions can  randomly share session cookies.
  
  Simone
  
  Jason Johnston wrote:      
Is it the same instance of Firefox?  If so then this is expected behavior;
user sessions are typically tracked by a JSESSION-ID cookie, and Firefox
uses the same cookies for each instance of the browser (each system user
is allowed one instance at a time I believe).  IE allows a single system
user to launch multiple instances of the browser, each one using its own
set of cookies.

If this is what you're seeing then it's not a problem with the auth
framework or Cocoon in general; this is standard behavior for web
applications that track user sessions via cookies.


  
          
I found another strange behaviour of the auth. framework: it seems that  I
can have several users logged in if I use Internet Explorer (v.  6.0.2)
but with Mozilla firefox (v1.0.7) the behaviour is as explained  below or
get always logged in as the first user (using the action  auth-loggedIn)

  Any ideas what the problem is and how to solve this?
  Thanks,
  Paula

Paula Estrella <pa...@yahoo.com.ar> escribió:Hi,  I'm using (or
trying to use) the authentication block included in  cocoon and it works
fine if there's only 1 user logged in, but when I  try to log in twice
with different user names (i.e. I want many users  logged in at the same
time)   I get the error  "org.apache.cocoon.ProcessingException: User is
already authenticated  using handler: portal-handler".

  Now, my question is: how can I allow several users logged in at the same
time using this auth. block?

  Thanks in advance,
  Paula

  Here's the sitemap I'm using (it's basically a copy&paste from the block
example)

  <map:component-configurations>
        <authentication-manager>
          <handlers>
               <handler name="portal-handler">
                    <redirect-to  uri="cocoon:/login"/>
              <authentication uri="cocoon:raw:/authenticate"/>
            </handler>
          </handlers>
        </authentication-manager>
      </map:component-configurations>

  <map:match pattern="login">
   <map:generate src="docs/login.xml"/>
          <map:transform src="styles/simple-page2html.xsl"/>
          <map:transform type="encodeURL"/>
          <map:serialize/>
        </map:match>

   <map:match pattern="do-login">
                <map:act type="auth-login">
            <map:parameter name="handler" value="portal-handler"/>
             <map:parameter name="parameter_name"
value="{request-param:username}"/>
             <map:parameter name="parameter_password"
value="{request-param:password}"/>
            <map:redirect-to  uri="portal"/>
            </map:act>
          <map:redirect-to uri="error"/>
        </map:match>
    
        



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

  
    
  -- 
  Simone Gianni
  

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Re: authentication block problem

Posted by Simone Gianni <s....@thebug.it>.
Hi Paula,
AFAIK in IE it works like this :
- If you start another browser instance (by clicking on start->Internet 
explorer) then you don't take the cookies from another running instance.
- If you open another window of the browser (by typing CTRL+N, or 
file->new->window, or clicking on a link that opens another window) then 
you have all the cookies of the "main" window.

While in Firefox it does not matter if you launch a new instance or open 
another window or tab, cookies are always shared (don't know if there is 
a configuration option).

So, you should try to open a new window in internet explorer by typing 
CTRL+N, in this case it should behave same as firefox.

To test concurrency on a web application is always better to use two 
different computers, since also IE in rare and strange cases (i can't 
remember, something to do with HTTPS, P3P) and in some versions can 
randomly share session cookies.

Simone

Jason Johnston wrote:

>Is it the same instance of Firefox?  If so then this is expected behavior;
>user sessions are typically tracked by a JSESSION-ID cookie, and Firefox
>uses the same cookies for each instance of the browser (each system user
>is allowed one instance at a time I believe).  IE allows a single system
>user to launch multiple instances of the browser, each one using its own
>set of cookies.
>
>If this is what you're seeing then it's not a problem with the auth
>framework or Cocoon in general; this is standard behavior for web
>applications that track user sessions via cookies.
>
>
>  
>
>>I found another strange behaviour of the auth. framework: it seems that  I
>>can have several users logged in if I use Internet Explorer (v.  6.0.2)
>>but with Mozilla firefox (v1.0.7) the behaviour is as explained  below or
>>get always logged in as the first user (using the action  auth-loggedIn)
>>
>>  Any ideas what the problem is and how to solve this?
>>  Thanks,
>>  Paula
>>
>>Paula Estrella <pa...@yahoo.com.ar> escribió:Hi,  I'm using (or
>>trying to use) the authentication block included in  cocoon and it works
>>fine if there's only 1 user logged in, but when I  try to log in twice
>>with different user names (i.e. I want many users  logged in at the same
>>time)   I get the error  "org.apache.cocoon.ProcessingException: User is
>>already authenticated  using handler: portal-handler".
>>
>>  Now, my question is: how can I allow several users logged in at the same
>>time using this auth. block?
>>
>>  Thanks in advance,
>>  Paula
>>
>>  Here's the sitemap I'm using (it's basically a copy&paste from the block
>>example)
>>
>>  <map:component-configurations>
>>        <authentication-manager>
>>          <handlers>
>>               <handler name="portal-handler">
>>                    <redirect-to  uri="cocoon:/login"/>
>>              <authentication uri="cocoon:raw:/authenticate"/>
>>            </handler>
>>          </handlers>
>>        </authentication-manager>
>>      </map:component-configurations>
>>
>>  <map:match pattern="login">
>>   <map:generate src="docs/login.xml"/>
>>          <map:transform src="styles/simple-page2html.xsl"/>
>>          <map:transform type="encodeURL"/>
>>          <map:serialize/>
>>        </map:match>
>>
>>   <map:match pattern="do-login">
>>                <map:act type="auth-login">
>>            <map:parameter name="handler" value="portal-handler"/>
>>             <map:parameter name="parameter_name"
>>value="{request-param:username}"/>
>>             <map:parameter name="parameter_password"
>>value="{request-param:password}"/>
>>            <map:redirect-to  uri="portal"/>
>>            </map:act>
>>          <map:redirect-to uri="error"/>
>>        </map:match>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>

-- 
Simone Gianni

Re: authentication block problem

Posted by Jason Johnston <co...@lojjic.net>.
Is it the same instance of Firefox?  If so then this is expected behavior;
user sessions are typically tracked by a JSESSION-ID cookie, and Firefox
uses the same cookies for each instance of the browser (each system user
is allowed one instance at a time I believe).  IE allows a single system
user to launch multiple instances of the browser, each one using its own
set of cookies.

If this is what you're seeing then it's not a problem with the auth
framework or Cocoon in general; this is standard behavior for web
applications that track user sessions via cookies.


> I found another strange behaviour of the auth. framework: it seems that  I
> can have several users logged in if I use Internet Explorer (v.  6.0.2)
> but with Mozilla firefox (v1.0.7) the behaviour is as explained  below or
> get always logged in as the first user (using the action  auth-loggedIn)
>
>   Any ideas what the problem is and how to solve this?
>   Thanks,
>   Paula
>
> Paula Estrella <pa...@yahoo.com.ar> escribió:Hi,  I'm using (or
> trying to use) the authentication block included in  cocoon and it works
> fine if there's only 1 user logged in, but when I  try to log in twice
> with different user names (i.e. I want many users  logged in at the same
> time)   I get the error  "org.apache.cocoon.ProcessingException: User is
> already authenticated  using handler: portal-handler".
>
>   Now, my question is: how can I allow several users logged in at the same
> time using this auth. block?
>
>   Thanks in advance,
>   Paula
>
>   Here's the sitemap I'm using (it's basically a copy&paste from the block
> example)
>
>   <map:component-configurations>
>         <authentication-manager>
>           <handlers>
>                <handler name="portal-handler">
>                     <redirect-to  uri="cocoon:/login"/>
>               <authentication uri="cocoon:raw:/authenticate"/>
>             </handler>
>           </handlers>
>         </authentication-manager>
>       </map:component-configurations>
>
>   <map:match pattern="login">
>    <map:generate src="docs/login.xml"/>
>           <map:transform src="styles/simple-page2html.xsl"/>
>           <map:transform type="encodeURL"/>
>           <map:serialize/>
>         </map:match>
>
>    <map:match pattern="do-login">
>                 <map:act type="auth-login">
>             <map:parameter name="handler" value="portal-handler"/>
>              <map:parameter name="parameter_name"
> value="{request-param:username}"/>
>              <map:parameter name="parameter_password"
> value="{request-param:password}"/>
>             <map:redirect-to  uri="portal"/>
>             </map:act>
>           <map:redirect-to uri="error"/>
>         </map:match>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: authentication block problem

Posted by Paula Estrella <pa...@yahoo.com.ar>.
I found another strange behaviour of the auth. framework: it seems that  I can have several users logged in if I use Internet Explorer (v.  6.0.2) but with Mozilla firefox (v1.0.7) the behaviour is as explained  below or get always logged in as the first user (using the action  auth-loggedIn)
  
  Any ideas what the problem is and how to solve this?
  Thanks,
  Paula

Paula Estrella <pa...@yahoo.com.ar> escribió:Hi,  I'm using (or trying to use) the authentication block included in  cocoon and it works fine if there's only 1 user logged in, but when I  try to log in twice with different user names (i.e. I want many users  logged in at the same time)   I get the error  "org.apache.cocoon.ProcessingException: User is already authenticated  using handler: portal-handler".
  
  Now, my question is: how can I allow several users logged in at the same time using this auth. block?
  
  Thanks in advance,
  Paula
  
  Here's the sitemap I'm using (it's basically a copy&paste from the block example)
  
  <map:component-configurations>
        <authentication-manager>
          <handlers>
               <handler name="portal-handler">
                    <redirect-to  uri="cocoon:/login"/>     
              <authentication uri="cocoon:raw:/authenticate"/>
            </handler>
          </handlers>
        </authentication-manager>
      </map:component-configurations>
  
  <map:match pattern="login">
   <map:generate src="docs/login.xml"/>
          <map:transform src="styles/simple-page2html.xsl"/>
          <map:transform type="encodeURL"/>
          <map:serialize/>
        </map:match>
  
   <map:match pattern="do-login">
                <map:act type="auth-login">
            <map:parameter name="handler" value="portal-handler"/>
             <map:parameter name="parameter_name"  value="{request-param:username}"/>
             <map:parameter name="parameter_password"  value="{request-param:password}"/>
            <map:redirect-to  uri="portal"/>  
            </map:act>
          <map:redirect-to uri="error"/>
        </map:match>
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! -   http://correo.yahoo.com.ar


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar