Re: [Acegisecurity-developer] Dynamic defaultTargetUrl
Great I'm glad that worked. This could be an option on the APF at some point, but sub-classing is a good solution. It would be great to be able to add a parameter to URLs that will trigger ACEGI to use the referrer URL. That way some URLs will return and others won't. Perhaps an enhancement for a future release. -bp Tom Stroobants wrote: We have subclassed the AuthenticationProcessingFilter class and have overridden the successfulAuthentication method. Very easy ... We just put the referrer URL on the session before triggering ACEGI. I hit the login button and our own created class just checks if the targetUrl is empty and if it is get the referrer url from the session and redirect to that page ... Best regards, Tom. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Alex Sent: zaterdag 26 augustus 2006 0:26 To: acegisecurity-developer@lists.sourceforge.net Subject: Re: [Acegisecurity-developer] Dynamic defaultTargetUrl Brian Pontarelli wrote: I think the issue is that the login is a component that exists on many pages and the login/failure should return the user to the page they were viewing rather than a stock login/home page. The best bet at this point is probably to subclass APF and just redirect or forward back to a URL stored in a form parameter. You will have to place the current URL in a hidden field. You might be able to pull off a referrer URL as well depending on your setup. If the referrer URL approach works, I think this would be of general usefulness to others as well. We could have a new property, forceReturnToReferrerUrl on AbstractProcessingFilter. If anyone gets this to consistently work, please pop your code into a JIRA patch and I'll get it applied. Cheers Ben - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
Re: [Acegisecurity-developer] Dynamic defaultTargetUrl
We could wire in a strategy interface for that logic as well. On 8/31/06, Brian Pontarelli [EMAIL PROTECTED] wrote: Great I'm glad that worked. This could be an option on the APF at some point, but sub-classing is a good solution. It would be great to be able to add a parameter to URLs that will trigger ACEGI to use the referrer URL. That way some URLs will return and others won't. Perhaps an enhancement for a future release. -bp Tom Stroobants wrote: We have subclassed the AuthenticationProcessingFilter class and have overridden the successfulAuthentication method. Very easy ... We just put the referrer URL on the session before triggering ACEGI. I hit the login button and our own created class just checks if the targetUrl is empty and if it is get the referrer url from the session and redirect to that page ... Best regards, Tom. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Alex Sent: zaterdag 26 augustus 2006 0:26 To: acegisecurity-developer@lists.sourceforge.net Subject: Re: [Acegisecurity-developer] Dynamic defaultTargetUrl Brian Pontarelli wrote: I think the issue is that the login is a component that exists on many pages and the login/failure should return the user to the page they were viewing rather than a stock login/home page. The best bet at this point is probably to subclass APF and just redirect or forward back to a URL stored in a form parameter. You will have to place the current URL in a hidden field. You might be able to pull off a referrer URL as well depending on your setup. If the referrer URL approach works, I think this would be of general usefulness to others as well. We could have a new property, forceReturnToReferrerUrl on AbstractProcessingFilter. If anyone gets this to consistently work, please pop your code into a JIRA patch and I'll get it applied. Cheers Ben - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
Re: [Acegisecurity-developer] Dynamic defaultTargetUrl
We have subclassed the AuthenticationProcessingFilter class and have overridden the successfulAuthentication method. Very easy ... We just put the referrer URL on the session before triggering ACEGI. I hit the login button and our own created class just checks if the targetUrl is empty and if it is get the referrer url from the session and redirect to that page ... Best regards, Tom. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Alex Sent: zaterdag 26 augustus 2006 0:26 To: acegisecurity-developer@lists.sourceforge.net Subject: Re: [Acegisecurity-developer] Dynamic defaultTargetUrl Brian Pontarelli wrote: I think the issue is that the login is a component that exists on many pages and the login/failure should return the user to the page they were viewing rather than a stock login/home page. The best bet at this point is probably to subclass APF and just redirect or forward back to a URL stored in a form parameter. You will have to place the current URL in a hidden field. You might be able to pull off a referrer URL as well depending on your setup. If the referrer URL approach works, I think this would be of general usefulness to others as well. We could have a new property, forceReturnToReferrerUrl on AbstractProcessingFilter. If anyone gets this to consistently work, please pop your code into a JIRA patch and I'll get it applied. Cheers Ben - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
Re: [Acegisecurity-developer] Dynamic defaultTargetUrl
I think the issue is that the login is a component that exists on many pages and the login/failure should return the user to the page they were viewing rather than a stock login/home page. The best bet at this point is probably to subclass APF and just redirect or forward back to a URL stored in a form parameter. You will have to place the current URL in a hidden field. You might be able to pull off a referrer URL as well depending on your setup. -bp Ben Alex wrote: Tom Stroobants wrote: Suppose that my login form is integrated in an other page and I want to return to that page that integrated my login page (so the original page) ... How do you do that in ACEGI ? Couldn't you use AbstractProcessingFilter.defaultTargetUrl = your login page plus AbstractProcessingFilter.alwaysUseDefaultTargetUrl = true? HTH Ben - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
Re: [Acegisecurity-developer] Dynamic defaultTargetUrl
Brian Pontarelli wrote: I think the issue is that the login is a component that exists on many pages and the login/failure should return the user to the page they were viewing rather than a stock login/home page. The best bet at this point is probably to subclass APF and just redirect or forward back to a URL stored in a form parameter. You will have to place the current URL in a hidden field. You might be able to pull off a referrer URL as well depending on your setup. If the referrer URL approach works, I think this would be of general usefulness to others as well. We could have a new property, forceReturnToReferrerUrl on AbstractProcessingFilter. If anyone gets this to consistently work, please pop your code into a JIRA patch and I'll get it applied. Cheers Ben - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
Re: [Acegisecurity-developer] Dynamic defaultTargetUrl
You could subclass AuthenticationProcessingFilter and override the successfulAuthentication() method. This method redirects to either the defaultTargetUrl or the requestedTargetUrl. The default implementation of this method is defined in the AbstractProcessingFilter class. Take a look at it. The code is easy to follow. Nathan Nathan Ward ResQSoft, Inc. 703.861.9103 www.resqsoft.com - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
Re: [Acegisecurity-developer] Dynamic defaultTargetUrl
Tom Stroobants wrote: Suppose that my login form is integrated in an other page and I want to return to that page that integrated my login page (so the original page) ... How do you do that in ACEGI ? Couldn't you use AbstractProcessingFilter.defaultTargetUrl = your login page plus AbstractProcessingFilter.alwaysUseDefaultTargetUrl = true? HTH Ben - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Home: http://acegisecurity.org Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer