How to use nuxeo rest api without authenticate?
I use nuxeo rest api with basic authenticate. But I want to use it without authenticate? How can I solve it?
Hello,
Why are you avoiding authentication? This is a bad practice: allowing anonymous auth has a lot of side effects, specially on the UI part.
Regards
Hello,
I think you can use the Anonymous authentication: https://doc.nuxeo.com/nxdoc/using-anonymous-authentication/
However, you will need to contribute to “specificChain” extension point. For more info: https://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20Platform%20LTS%202019-10.10/viewContribution/org.nuxeo.ecm.automation.server.auth.config–specificChains
The contribution shouls be something like this:
<require>org.nuxeo.ecm.restapi.server.auth.config</require>
<extension target="org.nuxeo.ecm.platform.ui.web.auth.service.PluggableAuthenticationService" point="specificChains">
<specificAuthenticationChain name="RestAPI">
<urlPatterns>
<url>(.*)/api/v.*</url>
</urlPatterns>
<replacementChain>
<plugin>ANONYMOUS_AUTH</plugin>
<plugin>AUTOMATION_BASIC_AUTH</plugin>
<plugin>TOKEN_AUTH</plugin>
<plugin>OAUTH2_AUTH</plugin>
<plugin>JWT_AUTH</plugin>
</replacementChain>
</specificAuthenticationChain>
</extension>
Regards.