|
Re: REST API Auth issue, [message #1431974 is a reply to message #1431925] |
Fri, 26 September 2014 12:20 |
Mahdi Ben Alaya Messages: 229 Registered: November 2013 |
Senior Member |
|
|
Hello Ramakrishna,
You have to use the token admin/admin (instead of admin:admin)
Here is a curl example: curl -H "Authorization: Basic YWRtaW4vYWRtaW4" 127.0.0.1:8080/om2m/nscl
So, please tell me this works for you.
I will push an update to replace "/" with ":" to make it simple for every body.
Thanks
[Updated on: Fri, 26 September 2014 12:22] Report message to a moderator
|
|
|
Re: REST API Auth issue, [message #1432160 is a reply to message #1431974] |
Fri, 26 September 2014 18:24 |
Mahdi Ben Alaya Messages: 229 Registered: November 2013 |
Senior Member |
|
|
You can update the "org.eclipse.om2m.adminRequestingEntity" on the configuration file and set "admin:admin" instead of "admin/admin".
Every things will work correctly expect the webinterface because it encodes the basic authentication based on "/".
But this is very simple to fix. You need to replace "/" by ":" in the om2m.js code like this:
File: org.eclipse.om2m.webapp.resourcesbrowser/src/main/resources/webapps/om2m.js
function make_base_auth(user, password) {
var tok = user + ':' + password;
var hash = btoa(tok);
return "Basic " + hash;
}
Please tell me if it is ok for you.
Mahdi
[Updated on: Fri, 26 September 2014 18:25] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03551 seconds