There are some situtation, need to invoke hook boot before serving cache content. Especially i need to check if a user with token has access to see that page and after that serve the page or not.

Need to invoke hook boot on authcache builtin before the cached content.

Comments

znerol’s picture

Category: Feature request » Support request

Please provide some more information on the specific use case. Especially give some pointers to the modules/methods used to implement token authentication and also whether or not this applies to standard pages (like node/X) or whether this is about Drupal used as an API (e.g. REST). Also is this site attempting to control access (via token) for anonymous users or for authenticated ones?

pdendis’s picture

Especially i am trying to authenticate a user via web service of other domain, using curl http request. I have a url callback which implements that functionality. The web service responds with a user id, then i try to check if i have a user mapped with that user id. If the user exists then gets authenticated else needs to be created.
After this process i leave authentication url callback and redirect him to node page, which is cached (authcache) per user role. The problem is, if another user has created the cached version of the page the hook boot is not invoked. I need hook boot, to limit the accessibility of the node page( using session and cookies).
I don't want a user to type node/xxx and browse the page, but first to visit /auth url(authnetication url callback) and after node page. I also need the node page if a user visit it to be cached.

znerol’s picture

Do you also have substantial anonymous traffic or is this site mainly used by authenticated users?

pdendis’s picture

It is used by authenticated, it's commerce site

znerol’s picture

In this case I recommend to disable authcache for anonymous users. I expect that this will solve the problem.

znerol’s picture

Status: Active » Fixed

Please only reopen if you are the author of this support request. Otherwise open a new support request.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.