You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Maria Grigorieva <ma...@hotmail.com> on 2009/09/06 23:43:35 UTC

using Authentication-fw in cocoon 2.1.10! HELP!!!

Hello, dear mailing-list! :)

I'm using Authentication-fw and have one problem:

I have 2 types of resources which have to be protected and 1 authentication
handler.

User may choose: 

1. pass the login at startup by button ("login")

2. try to view resource and login by demand

When user pass the login, the system redirects to some page. For example:

	<map:match pattern="params.*">
		<map:act type="auth-protect">
			<map:parameter name="handler" value="userhandler"/> 
			<map:redirect-to uri="model/do_modelParams.{1}"/>
		</map:act>
	</map:match>

When user login by button (at startup) I redirect him to "index" page:

<map:match pattern="do-login">
        <map:act type="auth-login">
          <map:parameter name="handler" value="userhandler"/>
          <map:parameter name="parameter_name"
value="{request-param:username}"/>
          <map:parameter name="parameter_password"
value="{request-param:secretword}"/>
          <map:redirect-to uri="content/index.stat"/>
        </map:act>
        <map:redirect-to uri="login"/>
      </map:match>

<map:match pattern="login">
        <map:act type="auth-loggedIn"> 
          <map:parameter name="handler" value="userhandler"/> 
          <map:redirect-to uri="content/index.stat"/>
        </map:act>
        <map:generate src="model/login/login.xml"/>
        <map:transform src="model/login/form.xsl"/>
        <map:serialize/>
</map:match>

So, the situation. 

I logged-in at site startup by button "Sign In" - go to
"content/index.stat".

And I can view protected documents.

But If I haven't logged-in by "Sign In" and want to view protected resource
- 

then the system redirects me to "login" and after that again on
"content/index.stat"!!!

I need to make redirection to the page, from which I've just wanted to view,
but was 

asked to login. 

Please, help! :)



-- 
View this message in context: http://www.nabble.com/using-Authentication-fw-in-cocoon-2.1.10%21-HELP%21%21%21-tp25322395p25322395.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: using Authentication-fw in cocoon 2.1.10! HELP!!!

Posted by warrell harries <wa...@googlemail.com>.
Hi Maria,

I have the same problem - I gues one must use multiple matchers and pass
these around from pipeline to pipeline and use the inputmodule {uri}

Did you solve this problem?

2009/9/6 Maria Grigorieva <ma...@hotmail.com>

>
> The main problem is that pages "first" and "five" open in new window.
>
> And redirection to "index" make dublication of the whole site )))
>
>
>
> Maria Grigorieva wrote:
> >
> > I mean:
> >
> > If I logged in from the page named "first" - I want to redirect to the
> > page "first"
> >
> > If I logged in from page "five" - redirect to "five"... etc
> >
> >
> > Maria Grigorieva wrote:
> >>
> >> Hello, dear mailing-list! :)
> >>
> >> I'm using Authentication-fw and have one problem:
> >>
> >> I have 2 types of resources which have to be protected and 1
> >> authentication handler.
> >>
> >> User may choose:
> >>
> >> 1. pass the login at startup by button ("login")
> >>
> >> 2. try to view resource and login by demand
> >>
> >> When user pass the login, the system redirects to some page. For
> example:
> >>
> >>      <map:match pattern="params.*">
> >>              <map:act type="auth-protect">
> >>                      <map:parameter name="handler" value="userhandler"/>
> >>                      <map:redirect-to uri="model/do_modelParams.{1}"/>
> >>              </map:act>
> >>      </map:match>
> >>
> >> When user login by button (at startup) I redirect him to "index" page:
> >>
> >> <map:match pattern="do-login">
> >>         <map:act type="auth-login">
> >>           <map:parameter name="handler" value="userhandler"/>
> >>           <map:parameter name="parameter_name"
> >> value="{request-param:username}"/>
> >>           <map:parameter name="parameter_password"
> >> value="{request-param:secretword}"/>
> >>           <map:redirect-to uri="content/index.stat"/>
> >>         </map:act>
> >>         <map:redirect-to uri="login"/>
> >>       </map:match>
> >>
> >> <map:match pattern="login">
> >>         <map:act type="auth-loggedIn">
> >>           <map:parameter name="handler" value="userhandler"/>
> >>           <map:redirect-to uri="content/index.stat"/>
> >>         </map:act>
> >>         <map:generate src="model/login/login.xml"/>
> >>         <map:transform src="model/login/form.xsl"/>
> >>         <map:serialize/>
> >> </map:match>
> >>
> >> So, the situation.
> >>
> >> I logged-in at site startup by button "Sign In" - go to
> >> "content/index.stat".
> >>
> >> And I can view protected documents.
> >>
> >> But If I haven't logged-in by "Sign In" and want to view protected
> >> resource -
> >>
> >> then the system redirects me to "login" and after that again on
> >> "content/index.stat"!!!
> >>
> >> I need to make redirection to the page, from which I've just wanted to
> >> view, but was
> >>
> >> asked to login.
> >>
> >> Please, help! :)
> >>
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/using-Authentication-fw-in-cocoon-2.1.10%21-HELP%21%21%21-tp25322395p25322475.html
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: using Authentication-fw in cocoon 2.1.10! HELP!!!

Posted by Maria Grigorieva <ma...@hotmail.com>.
The main problem is that pages "first" and "five" open in new window. 

And redirection to "index" make dublication of the whole site ))) 



Maria Grigorieva wrote:
> 
> I mean: 
> 
> If I logged in from the page named "first" - I want to redirect to the
> page "first"
> 
> If I logged in from page "five" - redirect to "five"... etc
> 
> 
> Maria Grigorieva wrote:
>> 
>> Hello, dear mailing-list! :)
>> 
>> I'm using Authentication-fw and have one problem:
>> 
>> I have 2 types of resources which have to be protected and 1
>> authentication handler.
>> 
>> User may choose: 
>> 
>> 1. pass the login at startup by button ("login")
>> 
>> 2. try to view resource and login by demand
>> 
>> When user pass the login, the system redirects to some page. For example:
>> 
>> 	<map:match pattern="params.*">
>> 		<map:act type="auth-protect">
>> 			<map:parameter name="handler" value="userhandler"/> 
>> 			<map:redirect-to uri="model/do_modelParams.{1}"/>
>> 		</map:act>
>> 	</map:match>
>> 
>> When user login by button (at startup) I redirect him to "index" page:
>> 
>> <map:match pattern="do-login">
>>         <map:act type="auth-login">
>>           <map:parameter name="handler" value="userhandler"/>
>>           <map:parameter name="parameter_name"
>> value="{request-param:username}"/>
>>           <map:parameter name="parameter_password"
>> value="{request-param:secretword}"/>
>>           <map:redirect-to uri="content/index.stat"/>
>>         </map:act>
>>         <map:redirect-to uri="login"/>
>>       </map:match>
>> 
>> <map:match pattern="login">
>>         <map:act type="auth-loggedIn"> 
>>           <map:parameter name="handler" value="userhandler"/> 
>>           <map:redirect-to uri="content/index.stat"/>
>>         </map:act>
>>         <map:generate src="model/login/login.xml"/>
>>         <map:transform src="model/login/form.xsl"/>
>>         <map:serialize/>
>> </map:match>
>> 
>> So, the situation. 
>> 
>> I logged-in at site startup by button "Sign In" - go to
>> "content/index.stat".
>> 
>> And I can view protected documents.
>> 
>> But If I haven't logged-in by "Sign In" and want to view protected
>> resource - 
>> 
>> then the system redirects me to "login" and after that again on
>> "content/index.stat"!!!
>> 
>> I need to make redirection to the page, from which I've just wanted to
>> view, but was 
>> 
>> asked to login. 
>> 
>> Please, help! :)
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/using-Authentication-fw-in-cocoon-2.1.10%21-HELP%21%21%21-tp25322395p25322475.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Re: using Authentication-fw in cocoon 2.1.10! HELP!!!

Posted by Maria Grigorieva <ma...@hotmail.com>.
I mean: 

If I logged in from the page named "first" - I want to redirect to the page
"first"

If I logged in from page "five" - redirect to "five"... etc


Maria Grigorieva wrote:
> 
> Hello, dear mailing-list! :)
> 
> I'm using Authentication-fw and have one problem:
> 
> I have 2 types of resources which have to be protected and 1
> authentication handler.
> 
> User may choose: 
> 
> 1. pass the login at startup by button ("login")
> 
> 2. try to view resource and login by demand
> 
> When user pass the login, the system redirects to some page. For example:
> 
> 	<map:match pattern="params.*">
> 		<map:act type="auth-protect">
> 			<map:parameter name="handler" value="userhandler"/> 
> 			<map:redirect-to uri="model/do_modelParams.{1}"/>
> 		</map:act>
> 	</map:match>
> 
> When user login by button (at startup) I redirect him to "index" page:
> 
> <map:match pattern="do-login">
>         <map:act type="auth-login">
>           <map:parameter name="handler" value="userhandler"/>
>           <map:parameter name="parameter_name"
> value="{request-param:username}"/>
>           <map:parameter name="parameter_password"
> value="{request-param:secretword}"/>
>           <map:redirect-to uri="content/index.stat"/>
>         </map:act>
>         <map:redirect-to uri="login"/>
>       </map:match>
> 
> <map:match pattern="login">
>         <map:act type="auth-loggedIn"> 
>           <map:parameter name="handler" value="userhandler"/> 
>           <map:redirect-to uri="content/index.stat"/>
>         </map:act>
>         <map:generate src="model/login/login.xml"/>
>         <map:transform src="model/login/form.xsl"/>
>         <map:serialize/>
> </map:match>
> 
> So, the situation. 
> 
> I logged-in at site startup by button "Sign In" - go to
> "content/index.stat".
> 
> And I can view protected documents.
> 
> But If I haven't logged-in by "Sign In" and want to view protected
> resource - 
> 
> then the system redirects me to "login" and after that again on
> "content/index.stat"!!!
> 
> I need to make redirection to the page, from which I've just wanted to
> view, but was 
> 
> asked to login. 
> 
> Please, help! :)
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/using-Authentication-fw-in-cocoon-2.1.10%21-HELP%21%21%21-tp25322395p25322453.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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