-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#13 Add support for NC-Token #15
base: main
Are you sure you want to change the base?
Conversation
From what I see in the UrlService.py, the following PR should add the possibility to use However, for some reasons, it doesn't work on my installation:
However, the direct
I was hoping you may test on your machine, maybe my configuration is somehow broken. |
About your errror - most likely you must not use HTTPS for "localhost" since this will not provide a valid certificate:
In addition: please first fix the things I commented above - if someone does not use a token at all, |
I redacted my original hostname in this log and replaced it with
From what I tested, even providing an empty header in config, doesn't break the config, but you're right - makes no sense to include it if it's empty or But the issue I mentioned above is something we need to fix before merging this. I'm open for suggestions what might be wrong. |
Hmm - but the error message is typical for a non valid certificate. Will it disappear if you do not use a token?
What happens, if one does not provide username/password? |
WIth invalid cert, it would return
Without token, it falls-back to username/password. And without any of them, we get 401:
|
Ah, ok - this was indeed the "not-fast-enough" server issue. The So the solution doesn't work, I'm open to ideas how to fix this. |
I think there is no way to fix this. The tokens are intended to be used by applications inside the Web-UI of Nextcloud to be able to communicate with the server backend and not for the API. As I already mentioned in the the documentation the idea is to create an "app password" so you don't have to use your real user password for the Netdata plugin. |
It works :) The However if you provide PR is ready for review. I added a exception in case someone sets both. I can change it to |
I updated the docs to reflect new functionality, and I removed the mention of |
Docs suggested that setting hostname is enough, where in reality, a user must set base url (i.e. protocol + hostname)
Proposed fix for #13