I have created an application with Cuba Platform. I have added the REST API addon.
- Next I have checked the rest auth settings in web-app.properties.
- Next I have added the rest-api-access to the admin user.
- Next I have set up the connedction in Postman or CURL as follows:
Run from localhost
> curl --location --request POST 'https://localhost:8080/app/rest/v2/oauth/token' \> -header 'Authorization: Basic ZGVtby02NmhoUzJBTDpiMTY0NTAwZjVmNjhlZDVmNmE1MDJiMjk2ZTBjNTJmMzJjODI5ZTVkMWQ3OGYwZGIxNjQ0YmFkYzgxYzU3MTI4' \> --header 'Content-Type: application/x-www-form-urlencoded' \> --data-urlencode 'grant_type=password' \> --data-urlencode 'username=admin' \> --data-urlencode 'password=admin'
When I execute the query everyting works as expected and a got a token.
When I have deployed the solution on th heroku I get unathorized when login on with same user and the same settings as on localhost.
I do use repository at Github, and on git push and upload of changes. A new build is made at Heroku. Does the settings in web-app.properties change on new build or do I have to create a prod-web-app.properties file to load up to Heroku?