Hi Kevin, Florent Guillaume
/>
When I try to connect to login on automation through OATUH2 token I always get http 401 statut.
curl -H "Authorization:Bearer 012453xxgqzl45" -X POST https://localhost:8080/nuxeo/api/v1/automation/login
Response :
<!doctype html><html lang="en"><head><title>HTTP Status 401 ? Unauthorized</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 401 ? Unauthorized</h1></body></html>%
When I try Basic AUTH, there is no problem and I don't understand why.
On my server side I have my custom auth.xml sets like :
...
<specificAuthenticationChain name="RestAPI">
<urlPatterns>
<url>(.*)/api/v.*</url>
</urlPatterns>
<replacementChain>
<plugin>AUTOMATION_BASIC_AUTH</plugin>
<plugin>BASIC_AUTH</plugin>
<plugin>PORTAL_AUTH</plugin>
<plugin>TOKEN_AUTH</plugin>
<plugin>OAUTH2_AUTH</plugin>
<plugin>JWT_AUTH</plugin>
<!-- <plugin>ANONYMOUS_AUTH</plugin> -->
</replacementChain>
</specificAuthenticationChain>
<specificAuthenticationChain name="ATOM_CMIS">
<urlPatterns>
<url>(.*)/atom/cmis(/.*)?</url>
<url>(.*)/atom/cmis10(/.*)?</url>
</urlPatterns>
<replacementChain>
<plugin>BASIC_AUTH</plugin>
<plugin>PORTAL_AUTH</plugin>
<plugin>TOKEN_AUTH</plugin>
</replacementChain>
</specificAuthenticationChain>
<specificAuthenticationChain name="JSON_CMIS">
<urlPatterns>
<url>(.*)/json/cmis(/.*)?</url>
</urlPatterns>
<replacementChain>
<plugin>BASIC_AUTH</plugin>
<plugin>PORTAL_AUTH</plugin>
<plugin>TOKEN_AUTH</plugin>
</replacementChain>
</specificAuthenticationChain>
<specificAuthenticationChain name="TokenAuth">
<headers>
<header name="X-Authentication-Token">.*</header>
</headers>
<replacementChain>
<plugin>TOKEN_AUTH</plugin>
<plugin>AUTOMATION_BASIC_AUTH</plugin>
</replacementChain>
</specificAuthenticationChain>
...
Thanks for your help