boombatower / chromecast-dashboard

A simple dashboard application for Chromecast.
https://boombatower.github.io/chromecast-dashboard/sender/
GNU General Public License v2.0
437 stars 78 forks source link

Is it possible to provide login-information? #6

Closed PatrickHuetter closed 8 years ago

PatrickHuetter commented 8 years ago

I would like to use chromecast-dashboard to render some graylog-dashboards to some of my monitoring screens. At this time i'm using raspberry pis but they are too slow in website rendering because of missing x11 acceleration.

Is it possible to do a login with chromecast-dashboard? If it's not possible by creating a post request, is it possible to authenticate by http basic auth? This would be a very nice feature!

PS. I know that i could copy a valid session id into the graylog-dashboard url, but i think that's not the preferred way to do this.

Best regards

boombatower commented 8 years ago

Since the dashboard just uses a fullscreen iframe it does not control sending headers or such as may be possible with javascript http request calls. Based on stack overflow it appears you can include the authentication information in the url.

<iframe src="http://username:password@domain.tld/..."></iframe>

http://stackoverflow.com/questions/11439927/how-can-i-http-authentication-login-with-javascript-for-an-iframe

Try passing that in as part of the URL on the sender.

The benefit of using an iframe is that it gets around xhr header issues and thus allows displaying any page that does not block loading in an iframe.

PatrickHuetter commented 8 years ago

Ok thanks, i'll look further. Am 12.03.2016 6:15 vorm. schrieb "Jimmy Berry" notifications@github.com:

Since the dashboard just uses a fullscreen iframe it does not control sending headers or such as may be possible with javascript http request calls. Based on stack overflow it appears you can include the authentication information in the url.

http://stackoverflow.com/questions/11439927/how-can-i-http-authentication-login-with-javascript-for-an-iframe

Try passing that in as part of the URL on the sender.

— Reply to this email directly or view it on GitHub https://github.com/boombatower/chromecast-dashboard/issues/6#issuecomment-195662190 .

boombatower commented 8 years ago

Please reopen if further action and please add a note if it works out. :)