Re: Auth-protect action problem

2003-03-17 Thread Lionel Crine
Hi,
Here is the sunshine part from my sitemap. I use cocoon-2.0.4.
1/ in the map:components element
 !-- === SunShine === --
map:actions
map:action name=sunRise_login 
src=org.apache.cocoon.sunshine.sunrise.acting.LoginAction/
map:action name=sunRise_logout 
src=org.apache.cocoon.sunshine.sunrise.acting.LogoutAction/
map:action name=sunRise_loggedIn 
src=org.apache.cocoon.sunshine.sunrise.acting.LoggedInAction/
map:action name=sunShine_session 
src=org.apache.cocoon.sunshine.acting.SessionAction/
map:action name=sunSpot_auth 
src=org.apache.cocoon.sunshine.sunspot.acting.AuthAction/
map:action name=sunRise_auth 
src=org.apache.cocoon.sunshine.sunrise.acting.AuthAction
  handlers
handler name=foo_handler 
xmlns:map=http://apache.org/cocoon/sitemap/1.0; 
xmlns:sunshine=http://sunshine.sundn.de/sunshine/1.0;
	  redirect-to uri=cocoon://login_page/
	  authentication uri=cocoon://authuser/
	/handler
  /handlers
/map:action
   /map:actions

2/ in the map:pipelines element

 map:pipeline
!-- === SunShine === --
map:match pattern=demo
!-- check you are already logged --
map:act type=sunRise_loggedIn
  map:parameter name=handler value=foo_handler/
  map:redirect-to uri=protected/display/
/map:act
!-- if not go to page login--
map:generate type=serverpages src=demo/login_page.xsp/
map:transform src=demo/login_page.xsl/
map:transform type=encodeURL/
map:serialize type=html/
/map:match
	!-- the login which call authuser via the handler --
	map:match pattern=login
	!-- check if the user is logged --
	map:act type=sunRise_loggedIn
	map:parameter name=handler value=foo_handler/
	map:redirect-to uri=protected/display/
	/map:act
	!-- log the user --
	map:act type=sunRise_login
	map:act type=sunShine_session/
	  map:parameter name=handler value=foo_handler/
	  map:parameter name=parameter_name value=request:name/
	  map:parameter name=parameter_password value=request:password/
  !-- if the authentication is successfull then this redirect 
will be performed --
	  map:redirect-to uri=demo/
	/map:act
	!-- authentication failed --
	map:generate src=demo/login_failed.xml/
	map:transform src=demo/login_failed.xsl/
	map:serialize type=html/
	/map:match
	

!-- the authentication --
map:match pattern=authuser
map:generate src=demo/user.xml/
!-- check the user --
map:transform src=demo/user.xsl
  map:parameter name=use-request-parameters value=true/
/map:transform
map:serialize type=xml/
/map:match
!-- = the protected resources == --
map:match pattern=protected/**
		map:act type=sunRise_auth
	  map:parameter name=handler value=foo_handler/
	
	!-- welcome page --
		map:match pattern=protected/display
		  map:generate type=serverpages src=demo/display.xsp/
		  map:transform type=xslt src=demo/display.xsl
map:parameter name=use-request-parameters 
value=true/
		  /map:transform
		  map:serialize type=html/
	   /map:match
	
	
	   /map:act
	/map:match
	map:pipeline

Hope that help.

Moreover I had this error but I don't remember how I solved it. I think the 
handler (authentication-manager) is not in the right place.

Lionel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Auth-protect action problem

2003-03-17 Thread tdawber

Hi,

I have just been experimenting with the authentication system, below is the
pipelines section of my sitemap, which is now working, but this is a 2.1system.

Check carefully the documentation you have been using, I believe the authentication
system as evolved between 2.0.4 and 2.1 and some of the documentation on the
web site refers only to the new 2.1 system.

You may have a mixture of setting and configurations in your sitemap, some for
the 2.0.4 version and some for the 2.1 version

Tony

=

map:pipelines

 map:component-configurations
 authentication-manager
  handlers
   handler name=global
redirect-to uri=cocoon://login_page/
authentication uri=cocoon:raw://check/
   /handler
  /handlers
 /authentication-manager
/map:component-configurations

 !-- main pipeline --
 map:pipeline
 
 map:match pattern=check
 map:generate type=serverpages src="" /
 map:serialize type=xml /
 /map:match
 
 map:match pattern=login_page
   map:read mime-type=text/xhtml src="">
 /map:match

map:match pattern=**/*.jpg
map:read mime-type=images/jpeg src="" /
/map:match


 map:match pattern=login_ok
 map:read mime-type=text/html src="" /
 /map:match
 
 map:match pattern=login
 map:act type=auth-login 
 map:parameter name=handler value=global /
 map:parameter name=parameter_userid value={request-param:name} /
 map:parameter name=parameter_password value={request-param:password} /
 map:redirect-to uri=login_ok /
 /map:act
map:read mime-type=text/html src="" /
 /map:match

map:match pattern=logout
map:act type=auth-logout
map:parameter name=handler value=global /
map:redirect-to uri=login_page /
/map:act
/map:match

  map:match pattern=sage/*
   map:mount check-reload=yes src="" uri-prefix=sage/
  /map:match

 /map:pipeline

/map:pipelines

===






Ungvári Sándor [EMAIL PROTECTED]
16/03/2003 14:31
Please respond to cocoon-users


To:[EMAIL PROTECTED]
cc:
Subject:Auth-protect action problem


Hi!

I'd like to use the user authentication in cocoon 2.0.4. but I always get 
some errors. I've read much about this topic but I couldn't solve my 
problem. Here is my sitemap:
...
pipelines

map:component-configurations
 authentication-manager
  handlers
   handler name=userPortal
redirect-to uri=login/
authentication uri=userLogin/
   /handler
  /handlers
/authentication-manager
/map:component-configurations

pipeline
...
 map:match pattern=login
 map:generate type=xsp src="">
 map:serialize/
 /map:match

   map:match pattern=userLogin
 map:act type=auth-login
map:parameter name=handler value 
=userPortal/
map:parameter name=parameter_userid 
value ={request:user}/
map:parameter name=parameter_password 
value={request:password}/
map:redirect-to uri=services/
 /map:act
 !-- authentication failed: Back to login-page --
 map:generate type=xsp src="">
 map:serialize/
  /map:match

map:match pattern=services
 map:act type=auth-protect
 map:parameter name=handler value =userPortal/
 map:read src="" mime-type=image/gif/
 /map:act
 /map:match
...
/pipeline
...


type fatal

message UnnamedSelector: ComponentSelector could not find the component for 
hint [auth-protect]

description org.apache.avalon.framework.component.ComponentException: 
UnnamedSelector: ComponentSelector could not find the component for hint 
[auth-protect]

sender org.apache.cocoon.servlet.CocoonServlet


Should I define anything like this
map:components
 map:actions
 map:action name=auth-protect 
logger=sitemap.action.auth-protect 
src="">
 map:actions
...
???

If I do this the result is:

message Error in sitemap configuration : 
org.apache.cocoon.webapps.authentication.acting.AuthAction

description 
org.apache.avalon.framework.configuration.ConfigurationException: Error in 
sitemap configuration : 
org.apache.cocoon.webapps.authentication.acting.AuthAction

sender org.apache.cocoon.servlet.CocoonServlet

Maybe I've to add something to cocoon.xconf? Or what?

Please HELP me!!! q:-)
Soma 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






RE: Auth-protect action problem

2003-03-17 Thread Carsten Ziegeler
To clarify versioninng issues of the authentication and portal frameworks:
2.0.4 contains these parts in the scratchpad area as sunrise and sunspot.
 So, if you use 2.0.4, there is no auth-protect action but an
sunrise-... action.
2.0.5-dev (cvs) contains the authentication and portal framework in the
core; the action is called auth-protect
2.1-dev (cvs) the same version as 2.0.5-dev

Carsten


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2003 12:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Auth-protect action problem



Hi,

I have just been experimenting with the authentication system, below is the
pipelines section of my sitemap, which is now working, but this is a
2.1system.

Check carefully the documentation you have been using, I believe the
authentication
system as evolved between 2.0.4 and 2.1 and some of the documentation on the
web site refers only to the new 2.1 system.

You may have a mixture of setting and configurations in your sitemap, some
for
the 2.0.4 version and some for the 2.1 version

Tony


=

 map:pipelines

  map:component-configurations
   authentication-manager
handlers
  handler name=global
redirect-to uri=cocoon://login_page/
authentication uri=cocoon:raw://check/
  /handler
 /handlers
   /authentication-manager
 /map:component-configurations

  !-- main pipeline --
  map:pipeline

  map:match pattern=check
  map:generate type=serverpages src=check.xsp /
  map:serialize type=xml /
  /map:match

  map:match pattern=login_page
  map:read mime-type=text/xhtml src=login_page.html/
  /map:match

map:match pattern=**/*.jpg
map:read mime-type=images/jpeg
src=bodycare/common/images/{2}.jpg /
/map:match


  map:match pattern=login_ok
  map:read mime-type=text/html src=login_ok.html /
  /map:match

  map:match pattern=login
  map:act type=auth-login 
  map:parameter name=handler value=global /
  map:parameter name=parameter_userid
value={request-param:name} /
  map:parameter name=parameter_password
value={request-param:password} /
  map:redirect-to uri=login_ok /
  /map:act
 map:read mime-type=text/html src=login_failed.html /
  /map:match

map:match pattern=logout
map:act type=auth-logout
map:parameter name=handler value=global /
map:redirect-to uri=login_page /
/map:act
/map:match

map:match pattern=sage/*
  map:mount check-reload=yes src=bodycare/sage/ uri-prefix=sage/
/map:match

  /map:pipeline

 /map:pipelines


===


Ungvári Sándor [EMAIL PROTECTED]
16/03/2003 14:31
Please respond to cocoon-users

To:[EMAIL PROTECTED]
cc:
Subject:Auth-protect action problem



Hi!

I'd like to use the user authentication in cocoon 2.0.4. but I always get
some errors. I've read much about this topic but I couldn't solve my
problem. Here is my sitemap:
...
pipelines

map:component-configurations
 authentication-manager
  handlers
handler name=userPortal
  redirect-to uri=login/
  authentication uri=userLogin/
/handler
  /handlers
/authentication-manager
/map:component-configurations

pipeline
...
map:match pattern=login
map:generate type=xsp src=login.xsp/
map:serialize/
/map:match

map:match pattern=userLogin
map:act type=auth-login
   map:parameter name=handler value
=userPortal/
   map:parameter name=parameter_userid
value ={request:user}/
   map:parameter name=parameter_password
value={request:password}/
   map:redirect-to uri=services/
 /map:act
 !-- authentication failed: Back to login-page --
 map:generate type=xsp src=login.xsp/
 map:serialize/
   /map:match

map:match pattern=services
map:act type=auth-protect
map:parameter name=handler value =userPortal/
map:read src=docs/bart.gif
mime-type=image/gif/
/map:act
/map:match
...
/pipeline
...


type fatal

message UnnamedSelector: ComponentSelector could not find the component for
hint [auth-protect]

description org.apache.avalon.framework.component.ComponentException:
UnnamedSelector

RE: Auth-protect action problem

2003-03-17 Thread Lionel Crine
You're right, I use the scratchpad.
Be careful to my code, I only use sunrise actions and not auth-protect.
By the way, is there a pre compiled version of 2.1 ?

At 13:10 17/03/2003 +0100, you wrote:
To clarify versioninng issues of the authentication and portal frameworks:
2.0.4 contains these parts in the scratchpad area as sunrise and sunspot.
 So, if you use 2.0.4, there is no auth-protect action but an
sunrise-... action.
2.0.5-dev (cvs) contains the authentication and portal framework in the
core; the action is called auth-protect
2.1-dev (cvs) the same version as 2.0.5-dev
Carsten

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2003 12:52 PM
To: [EMAIL PROTECTED]
Subject: Re: Auth-protect action problem


Hi,

I have just been experimenting with the authentication system, below is the
pipelines section of my sitemap, which is now working, but this is a
2.1system.
Check carefully the documentation you have been using, I believe the
authentication
system as evolved between 2.0.4 and 2.1 and some of the documentation on the
web site refers only to the new 2.1 system.
You may have a mixture of setting and configurations in your sitemap, some
for
the 2.0.4 version and some for the 2.1 version
Tony


=
 map:pipelines

  map:component-configurations
   authentication-manager
handlers
  handler name=global
redirect-to uri=cocoon://login_page/
authentication uri=cocoon:raw://check/
  /handler
 /handlers
   /authentication-manager
 /map:component-configurations
  !-- main pipeline --
  map:pipeline
  map:match pattern=check
  map:generate type=serverpages src=check.xsp /
  map:serialize type=xml /
  /map:match
  map:match pattern=login_page
  map:read mime-type=text/xhtml src=login_page.html/
  /map:match
map:match pattern=**/*.jpg
map:read mime-type=images/jpeg
src=bodycare/common/images/{2}.jpg /
/map:match
  map:match pattern=login_ok
  map:read mime-type=text/html src=login_ok.html /
  /map:match
  map:match pattern=login
  map:act type=auth-login 
  map:parameter name=handler value=global /
  map:parameter name=parameter_userid
value={request-param:name} /
  map:parameter name=parameter_password
value={request-param:password} /
  map:redirect-to uri=login_ok /
  /map:act
 map:read mime-type=text/html src=login_failed.html /
  /map:match
map:match pattern=logout
map:act type=auth-logout
map:parameter name=handler value=global /
map:redirect-to uri=login_page /
/map:act
/map:match
map:match pattern=sage/*
  map:mount check-reload=yes src=bodycare/sage/ uri-prefix=sage/
/map:match
  /map:pipeline

 /map:pipelines


===
Ungvári Sándor [EMAIL PROTECTED]
16/03/2003 14:31
Please respond to cocoon-users
To:[EMAIL PROTECTED]
cc:
Subject:Auth-protect action problem


Hi!

I'd like to use the user authentication in cocoon 2.0.4. but I always get
some errors. I've read much about this topic but I couldn't solve my
problem. Here is my sitemap:
...
pipelines
map:component-configurations
 authentication-manager
  handlers
handler name=userPortal
  redirect-to uri=login/
  authentication uri=userLogin/
/handler
  /handlers
/authentication-manager
/map:component-configurations
pipeline
...
map:match pattern=login
map:generate type=xsp src=login.xsp/
map:serialize/
/map:match
map:match pattern=userLogin
map:act type=auth-login
   map:parameter name=handler value
=userPortal/
   map:parameter name=parameter_userid
value ={request:user}/
   map:parameter name=parameter_password
value={request:password}/
   map:redirect-to uri=services/
 /map:act
 !-- authentication failed: Back to login-page --
 map:generate type=xsp src=login.xsp/
 map:serialize/
   /map:match
map:match pattern=services
map:act type=auth-protect
map:parameter name=handler value =userPortal/
map:read src=docs/bart.gif
mime-type=image/gif/
/map:act
/map:match
...
/pipeline
...
type fatal

message

RE: Auth-protect action problem

2003-03-17 Thread Carsten Ziegeler


 -Original Message-
 From: Lionel Crine [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 17, 2003 1:15 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Auth-protect action problem
 
 
 You're right, I use the scratchpad.
 Be careful to my code, I only use sunrise actions and not auth-protect.
 
 By the way, is there a pre compiled version of 2.1 ?
 
No, not that I'm aware of - only the cvs and the nightly snapshots.

Carsten 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]