Rest via myopenhab always asks for auth

Hi,
I am trying to get the items details via myopenhab and rest api.
Unfortunately my created url doesn‘t work as expected. I need to log in via a browser popup, the credentials are not parsed to the site.

Any idea what is wrong with the url or how to fix this?

https://My.email%40provider.com:myPassword@myopenhab.org/rest/items/

Thank you!

There is nothing wrong with the URL.
You try to use a ‘feature’ of a browser that might not be supported any longer.
See e.g.
https://bugs.chromium.org/p/chromium/issues/detail?id=82250#c7

I tried it with safari and chrome on iOS and MacOS.
Same problem…

Any other idea?

according to RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax entering a password by submitting them as part of the URL in the form of user:password is deprecated.

As far as I’m aware, most browsers have removed HTTPS authentication via the user:password syntax.

So then there is no other, newer method to parse the credentials to myopenhab via a url?

no. RFCs are standard like documents. So as long as the browser follow the standard there is no way.

But what exactly do you want to achieve ? You only mentioned that you want to access the rest api and you want to use user:password in the url. Most browsers support storing user password in their internal password manager did you try that ? In case you store the url in a central place and different browsers should access it you need to enter this combination on all of them one time.

Yes, saving the credentials is an option.
Normally I use for the connecting client devices the „private“ mode. And there you have to type in the credentials every time.

But ok, now I know that my url is correct and it is a deprecated feature.

Thanks !

1 Like