Highlighted

/libs/granite/csrf/token.json query

Avatar

Avatar

rajeshs28932860

Avatar

rajeshs28932860

rajeshs28932860

11-03-2019

Hello

In 6.4 when I hit /libs/granite/csrf/token.json it gives me a empty json with json response.

however in 6.2, /libs/granite/csrf/token.json it redirects to login page (which we used in our code to add basic authentication and token headers to login to AEM through ajax call)

also, in crx/de token path looks grayed out

any thoughts ?

Replies

Highlighted

Avatar

Avatar

vaibhavs7024655

Avatar

vaibhavs7024655

vaibhavs7024655

11-03-2019

rajeshs28932860 AFAIK, this change in behavior is due to the granite:FinalArea mixin added to the node in AEM 6.4. This property is being brought starting 6.4  which marks the area for the internal code to prevent customizations.

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

11-03-2019

By default, only authenticated users can access the token. Hence, login as admin/other user and then you should be able to see the token.

The source code should include a dependency on granite.jquery to get the token.