cuba_AnonymousAuthenticationFilter will do the job
Define reusable filter
A reusable filter similar to cuba_AnonymousAuthenticationFilter may be defined, but the new filter will populate security context with anonymous session no matter cuba.rest.anonymousEnabled property is set.
There may be multiple cases.
Anonymous access is disabled in REST API
Then an a anonymous session must be obtained and set to the security context in controller code. E.g.:
Anonymous access is enabled in REST API
Then endpoints may be configured in the
rest-dispatcher-spring.xml
:cuba_AnonymousAuthenticationFilter
will do the jobDefine reusable filter
A reusable filter similar to
cuba_AnonymousAuthenticationFilter
may be defined, but the new filter will populate security context with anonymous session no mattercuba.rest.anonymousEnabled
property is set.