Project

General

Profile

Ticket lifetime

Added by Bob Blob over 6 years ago

Hi All

Just trying resolve latest issue with lifetime of the ticket generated by tvh. By default is set only to 5min? So now question how to change this? Im on TVH 4.2.6-7~g561355130. Which file is responsible for this? Where is located? And what value will change this time to "never expiry"

Regards
Raf


Replies (11)

RE: Ticket lifetime - Added by Robert Cameron over 6 years ago

Yes, by default a ticket is set to expire after 5 minutes. This setting is not stored in a configuration file, but hardcoded. You can find it here in the source at the top of the file (access.c):

#define TICKET_LIFETIME (5*60) /* in seconds */

If you want to change the lifetime of a ticket, you need to modify the source and install a custom-built version yourself.

RE: Ticket lifetime - Added by Bob Blob over 6 years ago

Hi

Cant find /src folder on my installation, that does mean have to make it myself?

RE: Ticket lifetime - Added by Robert Cameron over 6 years ago

Bob Blob wrote:

Hi

Cant find /src folder on my installation, that does mean have to make it myself?

access.c is part of the source code of Tvheadend. That's why I said if you need to change the ticket lifetime, you'll have to build it yourself.

That doesn't mean create the file yourself. That means download the entire source code for Tvheadend, modify it, recompile the source to get the program, package it up for installation, and then replace the version of Tvheadend you are currently using with the new custom-built one you just made.

If that does not seem like the path you wish to take, the unfortunately you are stuck with 5 minute tickets.

RE: Ticket lifetime - Added by Bob Blob over 6 years ago

Have compiled ready to go version but its looks like has lot of bugs 4.3 version (freezes etc). Can you tell me how to build same version 4.2.6 stable-presume?

RE: Ticket lifetime - Added by Robert Cameron over 6 years ago

The sources are available on GitHub. Go to the releases tab and download the 4.2.6 archive.

Or, if you are cloning the GitHub repo, after you clone it switch to the "release/4.2" branch, or use "tags/v4.2.6"

RE: Ticket lifetime - Added by Bob Blob over 6 years ago

Ok so 4.2.6 package followed compile steps (./configure, make). No problems at configure but unfortunately make end up with couple errors. Tried 4.3 and has been compiled without issues.

4.2 output:

root@plex:/home/Desktop/w/tvheadend-4.2.6# make
make -f Makefile.webui LANGUAGES="ach ady ar bg cs da de en_US en_GB es et fa fi fr he hr hu it ko lv lt nl no pl pt ro ru sl sk sq sv tr uk zh zh-Hans" all
make[1]: Entering directory '/home/rav/Desktop/w/tvheadend-4.2.6'
make -f Makefile.webui WEBUI=std   compile-std
make[2]: Entering directory '/home/Desktop/w/tvheadend-4.2.6'
make[2]: *** No rule to make target 'src/webui/static/extjs/adapter/ext/ext-base.js', needed by 'src/webui/static/tvh.js.gz'.  Stop.
make[2]: Leaving directory '/home/Desktop/w/tvheadend-4.2.6'
Makefile.webui:230: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/Desktop/w/tvheadend-4.2.6'
Makefile:762: recipe for target 'make_webui' failed
make: *** [make_webui] Error 2

RE: Ticket lifetime - Added by Georger Geo over 5 years ago

Hi,

In new version is there any more simple solution to prolong ticket lifetime or cancel ticket (token) at all?

RE: Ticket lifetime - Added by Paul M over 5 years ago

this does seem like it should be a user-configurable item.

but, you could also use the persistent authentication system instead, if you want the tickets to remain valid indefinitely.

RE: Ticket lifetime - Added by Georger Geo over 5 years ago

Dear Paul hi,

Could you please provide more details how to config permanent authentication system? I also need to stream iptv playlist to external users with external Ip.

RE: Ticket lifetime - Added by Paul M over 5 years ago

Hi,
Edit the user's password and in the and section you can see persistent authentication, enable it and save, then re-edit and you'll see a long string.
You can use that string in the stream url, with ?AUTH=

See https://www.tvheadend.org/boards/5/topics/35920?r=36465#message-36465 for a discussion about this sort of thing.

RE: Ticket lifetime - Added by Georger Geo over 5 years ago

Thank you, Ill try.

    (1-11/11)