[mythtv-commits] [MythTV/mythtv] 6e1ad5: Service API Authentication support

Peter Bennett noreply at github.com
Thu May 15 14:46:50 UTC 2025


  Branch: refs/heads/devel/webbapp-authentication
  Home:   https://github.com/MythTV/mythtv
  Commit: 6e1ad55b437bb91bded57ea7828d97dad5a9c322
      https://github.com/MythTV/mythtv/commit/6e1ad55b437bb91bded57ea7828d97dad5a9c322
  Author: Peter Bennett <pbennett at mythtv.org>
  Date:   2025-05-15 (Thu, 15 May 2025)

  Changed paths:
    M mythtv/libs/libmythbase/http/mythhttprequest.cpp
    M mythtv/libs/libmythbase/http/mythhttprequest.h
    M mythtv/libs/libmythbase/http/mythhttpservice.cpp
    M mythtv/libs/libmythbase/mythcorecontext.cpp
    M mythtv/libs/libmythbase/mythcorecontext.h
    M mythtv/libs/libmythbase/mythsession.cpp
    M mythtv/libs/libmythbase/mythsession.h
    M mythtv/programs/mythbackend/servicesv2/v2myth.cpp
    M mythtv/programs/mythbackend/servicesv2/v2myth.h

  Log Message:
  -----------
  Service API Authentication support

Add support for username and password authentication for the backend
service API. New methods Myth/LoginUser and Myth/GetUsers. Authenticate
using an access token supplied by the Myth/LoginUser method following
a valid user name and password.

A new setting APIAuthReqd determines whether authentication is required
and whether it is required only for remote IP addresses or for all IP
addresses. By default it is set to NONE.

All methods are protected when APIAuthReqd is enabled except for
Myth/LoginUser and Myth/GetConnectionInfo.

This builds on the existing mythsession framework already developed for
the defunct web frontend. The admin user is already pre-populated in
the database.


  Commit: 468e75104ab35396ffea30403b1699c6a1c1942a
      https://github.com/MythTV/mythtv/commit/468e75104ab35396ffea30403b1699c6a1c1942a
  Author: Peter Bennett <pbennett at mythtv.org>
  Date:   2025-05-15 (Thu, 15 May 2025)

  Changed paths:
    M mythtv/html/assets/i18n/en_US.json
    M mythtv/html/backend/src/app/app.module.ts
    M mythtv/html/backend/src/app/config/settings/channel-editor/channel-editor.component.html
    M mythtv/html/backend/src/app/config/settings/channel-editor/channel-editor.component.ts
    M mythtv/html/backend/src/app/dashboard/dashboard-settings/channel-groups/channel-groups.component.html
    M mythtv/html/backend/src/app/dashboard/dashboard-settings/channel-groups/channel-groups.component.ts
    M mythtv/html/backend/src/app/dashboard/dashboard-settings/dashboard-settings.component.html
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.css
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.html
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.spec.ts
    A mythtv/html/backend/src/app/dashboard/dashboard-settings/users/users.component.ts
    M mythtv/html/backend/src/app/dashboard/dashboard.component.html
    M mythtv/html/backend/src/app/dashboard/recordings/recordings.component.html
    M mythtv/html/backend/src/app/dashboard/recordings/recordings.component.ts
    M mythtv/html/backend/src/app/dashboard/videos/videos.component.html
    M mythtv/html/backend/src/app/dashboard/videos/videos.component.ts
    M mythtv/html/backend/src/app/guide/components/channelicon/channelicon.component.html
    M mythtv/html/backend/src/app/guide/components/channelicon/channelicon.component.ts
    M mythtv/html/backend/src/app/layout/navbar/navbar.component.html
    M mythtv/html/backend/src/app/layout/navbar/navbar.component.ts
    M mythtv/html/backend/src/app/primeng.module.ts
    M mythtv/html/backend/src/app/services/data.service.ts
    A mythtv/html/backend/src/app/services/error.interceptor.spec.ts
    A mythtv/html/backend/src/app/services/error.interceptor.ts
    M mythtv/html/backend/src/app/services/interfaces/myth.interface.ts
    M mythtv/html/backend/src/app/services/myth.service.ts
    A mythtv/html/backend/src/app/services/token.interceptor.spec.ts
    A mythtv/html/backend/src/app/services/token.interceptor.ts

  Log Message:
  -----------
  Web App Authentication Support

Add support for username and password authentication for the backend
web app.

Add a new section "Users" under Dashboard -> Settings. This supports
enabling the authentication requirement, selecting whether all IP
addresses or only remote IP addresses are protected, creating and
maintaining user login names and passwords.

Add a login link to the top banner of the web app. Also force a login
prompt if the backend requires a login (via http 401 response).

Update all communications to the backend to include the access token
from login if a login was performed.


Compare: https://github.com/MythTV/mythtv/compare/6e1ad55b437b%5E...468e75104ab3

To unsubscribe from these emails, change your notification settings at https://github.com/MythTV/mythtv/settings/notifications


More information about the mythtv-commits mailing list