lugreen
(Ray Lv)
April 16, 2019, 10:41am
#1
Hi,
I tested the rest api, added config in web-app.properties :
And use postman to get the token:
The server throws exception:
java.lang.IllegalArgumentException: There is no PasswordEncoder mapped for the id “null”
Am i doing some thing wrong or missing some thing?
1 Like
gorbunkov
(Maxim Gorbunkov)
April 17, 2019, 8:14am
#3
Hi, since the 7.0 version the storage format for the cuba.rest.client.secret
property has been changed. Now if you explicitly define the value of this property in your project you should specify a password encoder id, e.g.:
cuba.rest.client.secret={noop}secret
The details are in the GitHub issue
We’ll add an information about it to the documentation to make things more clear.
1 Like
lugreen
(Ray Lv)
April 17, 2019, 10:58am
#5
Hi, Max
Thanks for your reply.
I added the {noop} prefix,now the server return a error message :
The user for login is the admin provided by system.
gorbunkov
(Maxim Gorbunkov)
April 17, 2019, 11:12am
#6
Parameters must be passed not in the URL but in the request body:
3 Likes
lugreen
(Ray Lv)
April 17, 2019, 11:33am
#8
Hi, @gorbunkov
I have created a issue in GitHub.
opened 11:27AM - 17 Apr 19 UTC
closed 11:36AM - 17 Apr 19 UTC
<!--
Please use https://www.cuba-platform.com/discuss for discussion and suppo… rt.
When creating an issue, provide as much as possible of the following information:
-->
### Environment
- Documentation version: 7.0
- Part of the documentation: Manual
- Existing page: rest_api_v2_ex_get_token
### Description of the bug or enhancement
The description for get token for Rest API is outdate.
The password need add a prefix :{noop}
Discussion in forum: https://www.cuba-platform.com/discuss/t/geting-token-for-rest-api-throw-exception/8846/7
gorbunkov
(Maxim Gorbunkov)
April 17, 2019, 11:35am
#9
There is already a issue about that there: Document the changes of the cuba.rest.client.secret property value · Issue #427 · cuba-platform/documentation · GitHub
This information was added to the documentation repository and will appear on the website soon