Hi All,
I want to make my some of the assets and pages as a gated content so whenever end user tries to access those assets and pages, one form should open and only after successful submission, he can access those gated content.
So what I am thinking to achieve this -
All assets and pages would not be gated, so for all those content that has to be gated. author will mark some property in page property or dam property for page or assets respectively. On the basis of that field, those gated content should first ask to fill up a form.
Please correct me if anything better can be done to achieve the same.
My Queries -
1. What should be the URL of the form? How will form keep the gated content information from which it is opening? As after successful submission, that gated content has to be accessible.
2. Can i get some reference for this gated content?
Thanks & Regards,
Aman Goyal
Solved! Go to Solution.
First of all, the gated content should not be cached on dispatcher; if you want to use dispatcher, you should use the permission sensitive caching feature of it and implement the "authentication" part in a custom way (it should contain the logic mentioned below in a very similar way).
I would implement it using a cookie, which has to be set to a specific value. As I understood, it does not have to be super secure, but just avoid that Joe random directly accesses this asset.
Implement a filter, which reacts on requests to such gated assets. It checks for the presence of the cookie with the specific value. I would make the value depend on some property of the asset (e.g. some kind of id, which is different per asset; for example you can hash the full path of the asset and use it as id). If the cookie contains this id as value, access is permitted and the asset is delivered. If the cookie is not present or contains the wrong value, the filter redirects to the form.
Jörg
Check this post:- login Authentication mechanism for Dam assest in publish instance
This talks about the same.
//
CUG - Creating a Closed User Group
~kautuk
Views
Replies
Total Likes
Hi Kautuk,
Thanks for your early response. Our site doesn't have authentication requirement.
We would be using HTML/Adaptive form (Please Advice which would be better to use) for gated content.
To access this gated conted,user has to fill that form and on the successful submission of the form, he can access that gated content.
Views
Replies
Total Likes
First of all, the gated content should not be cached on dispatcher; if you want to use dispatcher, you should use the permission sensitive caching feature of it and implement the "authentication" part in a custom way (it should contain the logic mentioned below in a very similar way).
I would implement it using a cookie, which has to be set to a specific value. As I understood, it does not have to be super secure, but just avoid that Joe random directly accesses this asset.
Implement a filter, which reacts on requests to such gated assets. It checks for the presence of the cookie with the specific value. I would make the value depend on some property of the asset (e.g. some kind of id, which is different per asset; for example you can hash the full path of the asset and use it as id). If the cookie contains this id as value, access is permitted and the asset is delivered. If the cookie is not present or contains the wrong value, the filter redirects to the form.
Jörg
Hi Jorg,
Thanks for the response. It is really helpful me to achieve Gated Content.
Our client wants to have a different form for different assets. So that means, each assets would be having a specific form.
Now we have two types of form -
1. Pop Up Form - While clicking on the assets, form would open as popup.
2.Landing Form - While clicking on the assets, form would open as landing page form in the new tab.
So if it is a popup form, there would not be any issue of URL of the form.
But if it is a landing page form, how should be the URL of this form. Do we need to mention any parameter in that parameter.
And Which approach would be better to create form i.e. HTML form/ Adaptive Form ?
Please suggest.
Thanks & Regards,
Aman Goyal
Views
Replies
Total Likes
This servlet filter could also determine on the requested asset what kind of "authorization" must be executed, and act accordingly. In most cases, if the user has not performed the form submission, you will redirect the user to a different page, where the user is supposed to enter the data (you can store the path to the asset as a query string); on succesfull submission you can direct back to the asset.
Jörg
Views
Likes
Replies