This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » How can I enable session auth for the...

How can I enable session auth for the rest API?

How can I enable session auth for the rest API?

Sunday 30 November 2014 10:12:39 pm - 2 replies

Using eZ 2014.11 and this doc ( to change from basic http auth to session auth for access to the rest API, but I feel like there is a step I am missing.

When I hit the API endpoint with basic auth enabled in ezpublish.yml, I am successful.  When I enable session auth by adding "ezpublish_rest_session: ~" in configuration, I get a 500 Error with this exception in the logs:

Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.) 

Is there some step I have missed?

Monday 01 December 2014 5:35:53 pm

Did you remove (or comment out) all the lines for basic authentication:

#        ezpublish_rest:
#            pattern: ^/api/ezp/v2
#            stateless: true
#            ezpublish_http_basic:
#                realm: eZ Publish REST API


Otherwise session based won't work.

Monday 01 December 2014 8:59:24 pm

Well, that seems obvious now.  I had removed the ezpublish_http_basic: and realm, but not the whole security group.  That makes sense.  Thanks

Modified on Monday 01 December 2014 9:00:01 pm by Jackson Murtha


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from