Requesting an Access Token with an Authorization Code dont give me a token

hi, i have a problem with the OAuth 2 when i used the rest api just like the document first a create a new entry in the oauth2Clients directory, for instance with curl using this:

curl -u Administrator:Administrator \ -H 'Content-Type: application/json' \ -X POST http://NUXEO_SERVER/nuxeo/api/v1/directory/oauth2Clients \ -d @- « EOF { “entity-type”: “directoryEntry”, “directoryName”: “oauth2Clients”, “properties”: { “name”: “My App”, “clientId”: “myApp”, “clientSecret”: “secret”, “redirectURIs”: “”, “autoGrant”: “true”, “enabled”: “true” } } EOF

when i used the get in CURL authorization endpoint GET https://NUXEO_SERVER/nuxeo/oauth2/authorize?response_type=code&client_id=myApp the GET return nothing but… when i used intere link in my browser works fine and in the url give a like &code=KEDsdlodk (is a random code) when i used the code in the ### Requesting an Access Token with an Authorization Code and put de curl with: POST https://NUXEO_SERVER/nuxeo/oauth2/token?grant_type=authorization_code&client_id=myApp&code=authorizationCode return me invalid authorization code; error: invalid_grant im doing something wrong? check the images in the post pls, if anyone know about this let me know and thanks for the help

Sorry for my english is a little bad :c

1 votes

0 answers