Skip to content
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

Allow custom headers or at least Bearer authentication #54

Closed
AlbeRCLife opened this issue Dec 18, 2023 · 2 comments
Closed

Allow custom headers or at least Bearer authentication #54

AlbeRCLife opened this issue Dec 18, 2023 · 2 comments

Comments

@AlbeRCLife
Copy link

Right now there's only place to put basic auth and then it gets converted to "Basic $TOKEN(base64)":
https://github.com/kolbasa/cordova-plugin-apkupdater/blob/f98e939ba21c7d8fcbae3e2bc72a797c59c08096/src/android/downloader/FileDownloader.java#L46C41-L46C41

I think it would be more useful if we could just send whatever headers we want (or at least Authorization header in general).
If this is not possible at least another option in the download method to be able to send a Bearer token would be appreciated.

So then we could just have "Authorization": "Bearer $TOKEN" - no need for base64 here as it could be a JWT directly.

Thanks for your work!

@kolbasa
Copy link
Owner

kolbasa commented Jan 7, 2024

Sorry for the delay. I missed this because of all the holidays.
I have published a new version.
basicAuth has been replaced by authorization.
You can use this to pass a custom auth token.
Let me know if something doesn't work.

@kolbasa kolbasa closed this as completed Jan 8, 2024
@AlbeRCLife
Copy link
Author

Sorry for the late response and for answering on a closed issue but I wanted to say that the new version works.
Thank you and I hope you had some wonderful holidays!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants