Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to achieve gated content

amangoyal15
Level 3
Level 3

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

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

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

View solution in original post

0 Replies
kautuk_sahni
Employee
Employee

Check this post:- login Authentication mechanism for Dam assest in publish instance

This talks about the same.

//

  • If you have multiple assets which require authentication then why not create an assets listing page which can be shown to authenticated users. You can set CUG (Closed user group) properties on the listing page so that only required group of users will have access to it via login.
  • If you want to restrict access to a particular PDF or asset then there is a way to set the CUG properties on individual assets. http://www.wemblog.com/2013/01/how-to-associate-cug-with-dam-asset-in.html

CUG - Creating a Closed User Group

~kautuk

amangoyal15
Level 3
Level 3

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.

Jörg_Hoh
Correct answer by
Employee
Employee

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

View solution in original post

amangoyal15
Level 3
Level 3

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

Jörg_Hoh
Employee
Employee

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