Is there any way to make an authenticated client persist indefinitely, or skip authentication all together for a range of IPs?
Have a small client acting as a head with the montage view constantly loaded; as it is right now I must re-auth every so often. This client is within my local LAN, so an IP exemption would be keen. I cannot drop authentication all together, unfortunately.
I wish http://user:pass<host>/zm worked, but it does not.
Thanks
web authentication persistence
Re: web authentication persistence
Hello, not absolutely sure what you are after is the answer I am about to give, but is your problem that you want to keep your 'Montage View' on without having to manually re-authenticate?
There are two options:
1) You add a to the http url for streaming. For example, if you ever 'view source' when you are watching a monitor feed you'd see something like
You can forget the auth part (it's a little more complex to generate) and instead do
(Where rand is some random number)
Is this what you want?
Or are you considering a situation where the PHP interface is logging you out after a while and montage streaming pauses? The only solution for that is to do a HTTP POST login into zone minder once in a while to /index.php with the user and password as POST data
(see https://github.com/pliablepixels/zmNinj ... pp.js#L343 for an example of how I'm doing it in zmNinja or if you want to do it with curl use the "data" option to pass url encoded login parameters
If you do it with CuRL, I believe it should be
There are two options:
1) You add a
Code: Select all
&user=xxx&pass=yyyy
Code: Select all
/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=50&maxfps=5&buffer=1000&auth=e28780da75b57f3012e0f793ef70f033&connkey=557530&rand=1442607729"
Code: Select all
/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=50&maxfps=5&buffer=1000&user=xxx&passwd=yyyy&rand=1442607729"
Is this what you want?
Or are you considering a situation where the PHP interface is logging you out after a while and montage streaming pauses? The only solution for that is to do a HTTP POST login into zone minder once in a while to /index.php with the user and password as POST data
(see https://github.com/pliablepixels/zmNinj ... pp.js#L343 for an example of how I'm doing it in zmNinja or if you want to do it with curl use the "data" option to pass url encoded login parameters
If you do it with CuRL, I believe it should be
Code: Select all
curl -X POST -d "username=xxxx&password=xxxx&action=login&view=console" http://myserver.com/zm/index.php
segordon wrote:Is there any way to make an authenticated client persist indefinitely, or skip authentication all together for a range of IPs?
Have a small client acting as a head with the montage view constantly loaded; as it is right now I must re-auth every so often. This client is within my local LAN, so an IP exemption would be keen. I cannot drop authentication all together, unfortunately.
I wish http://user:pass<host>/zm worked, but it does not.
Thanks
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: web authentication persistence
You can also set up a web page to view monitors. Here is my code:
------------------------------------------
<html><meta http-equiv="refresh" content="300"><body><h1>Web Site Name</h1>
<p>Camera Group</p>
<img src="http://IP-Address/cgi-bin/nph-zms?mode= ... &pass=user">
<img src="http://IP-Address/cgi-bin/nph-zms?mode= ... &pass=user">
</body></html>
------------------------------------------
I have an unprivileged user set up that can view monitors only. AUTH_RELAY set to none.
monitor= is the number of the monitor you have set up
Page refreshes every 300 seconds
------------------------------------------
<html><meta http-equiv="refresh" content="300"><body><h1>Web Site Name</h1>
<p>Camera Group</p>
<img src="http://IP-Address/cgi-bin/nph-zms?mode= ... &pass=user">
<img src="http://IP-Address/cgi-bin/nph-zms?mode= ... &pass=user">
</body></html>
------------------------------------------
I have an unprivileged user set up that can view monitors only. AUTH_RELAY set to none.
monitor= is the number of the monitor you have set up
Page refreshes every 300 seconds