#include "tcp.h"
#include "lang_codes.h"
-#define TICKET_LIFETIME (5*60) /* in seconds */
-
struct access_entry_queue access_entries;
struct access_ticket_queue access_tickets;
struct passwd_entry_queue passwd_entries;
const char *
access_ticket_create(const char *resource, access_t *a)
{
- const int64_t lifetime = sec2mono(TICKET_LIFETIME);
+ const int64_t lifetime = sec2mono(config.ticket_expires);
uint8_t buf[20];
char id[41];
uint_fast32_t i;
config.realm = strdup("tvheadend");
config.info_area = strdup("login,storage,time");
config.cookie_expires = 7;
+ config.ticket_expires = 5 * 60;
config.dscp = -1;
config.descrambler_buffer = 9000;
config.epg_compress = 1;
.opts = PO_EXPERT,
.group = 5
},
+ {
+ .type = PT_U32,
+ .intextra = INTEXTRA_RANGE(1, 0x7ff, 1),
+ .id = "ticket_expires",
+ .name = N_("Ticket expiration (seconds)"),
+ .desc = N_("The number of seconds in which authentication tickets generated by "
+ "Tvheadend should expire."),
+ .off = offsetof(config_t, ticket_expires),
+ .opts = PO_EXPERT,
+ .group = 5
+ },
{
.type = PT_BOOL,
.id = "proxy",
int iptv_tpool_count;
char *date_mask;
int label_formatting;
+ uint32_t ticket_expires;
} config_t;
extern const idclass_t config_class;
if (config.cookie_expires)
htsmsg_add_u32(m, "cookie_expires", config.cookie_expires);
+ if (config.ticket_expires)
+ htsmsg_add_u32(m, "ticket_expires", config.ticket_expires);
+
if (config.info_area && config.info_area[0])
htsmsg_add_str(m, "info_area", config.info_area);