Prepare RTLPlus for new streaming prov

This commit is contained in:
Nirvana
2026-04-24 13:11:10 +02:00
parent b5891f4f54
commit 93465c6030
3 changed files with 17 additions and 4 deletions
@@ -59,7 +59,7 @@ class RTLPlusAuthenticator(BaseOAuth2Authenticator):
@property
def oauth_client_id(self) -> str:
return self._get_client_id()
return RTLPlusDefaults.BEDROCK_CLIENT_ID # "bedrock-m6group_web"
@property
def oauth_scope(self) -> str:
@@ -67,7 +67,13 @@ class RTLPlusAuthenticator(BaseOAuth2Authenticator):
@property
def oauth_redirect_uri(self) -> str:
return self.config.base_website
# Used in the authorize step
return f"{self.config.beta_website}tv-programm"
@property
def oauth_token_redirect_uri(self) -> str:
# Used in the token exchange step
return f"{self.config.beta_website}silent-sso-iframe.html"
@property
def config(self) -> RTLPlusConfig:
@@ -155,7 +161,13 @@ class RTLPlusAuthenticator(BaseOAuth2Authenticator):
password=password,
form_selector_pattern=r'<form id="rtlplus-form-login" action="([^"]*)"',
login_fields={"username": "username", "password": "password"},
extra_params={"prompt": "login", "nonce": str(uuid.uuid4())},
extra_params={
"prompt": "login",
"nonce": str(uuid.uuid4()),
"claim": "sub", # ← add this
"state": '{"redirectUrl":"#"}', # ← add this
"auth_flow_type": "login", # ← add this
},
additional_form_data={"credentialId": "", "rememberMe": "on"},
)
@@ -215,7 +215,7 @@ class RTLPlusChannelManager:
bedrock_token = self.auth.get_bedrock_token()
url = self.cfg.get_bedrock_layout_url(channel_seo=channel_seo)
location = f"https://plus.rtl.de/{channel_seo}/live"
location = f"{self.cfg.beta_website}{channel_seo}/live"
headers = self.cfg.get_bedrock_layout_headers(oauth_token, bedrock_token, location)
params = {"blockPage": 1, "nbPages": 2}
@@ -39,6 +39,7 @@ class RTLPlusDefaults:
# Client and version information
CLIENT_VERSION_FALLBACK = "2025.6.26.0"
CLIENT_ID = f"rtlplus-{PLATFORM_DEFAULT}"
BEDROCK_CLIENT_ID = "bedrock-m6group_web"
# API endpoints
AUTH_BASE_URL = "https://auth.rtl.de/auth/realms/rtlplus/protocol/openid-connect"