/libs/granite/csrf/token.json query

Avatar

Avatar
Validate 1
Level 2
rajeshs28932860
Level 2

Likes

6 likes

Total Posts

39 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
rajeshs28932860
Level 2

Likes

6 likes

Total Posts

39 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
rajeshs28932860
Level 2

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

Avatar

Avatar
Boost 5
Level 3
vaibhavs7024655
Level 3

Likes

18 likes

Total Posts

28 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile

Avatar
Boost 5
Level 3
vaibhavs7024655
Level 3

Likes

18 likes

Total Posts

28 posts

Correct reply

6 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 5
View profile
vaibhavs7024655
Level 3

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
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile

Avatar
Boost 250
MVP
Gaurav-Behl
MVP

Likes

250 likes

Total Posts

1,147 posts

Correct reply

283 solutions
Top badges earned
Boost 250
Establish
Give back 300
Give Back 50
Give Back 5
View profile
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.