home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
MPExtended
Disable Streaming Authentication
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="hkjensen" data-source="post: 940365" data-attributes="member: 52267"><p>Hi</p><p> </p><p>Since MediaPortal experimental IPTV filter can't handle authentication I like would like to propose the following feature:</p><p> </p><p>Disable Authentication for Streaming</p><p>- when a stream is requested ex <a href="http://xxx.xxx.xx:8080/Stream/TV?item=1012&transcoder=IPTV" target="_blank">http://xxx.xxx.xx:8080/Stream/TV?item=1012&transcoder=IPTV</a></p><p>- Check if authentication for streaming is disabled</p><p>- if disabled begin streaming</p><p>- else redirect to login page (normal behavior)</p><p> </p><p>Requires only changes to 3 files:</p><p> </p><p>Changes:</p><p>[CODE] .../Controllers/StreamController.cs | 4 ++++</p><p>Config/Authentication.xml | 2 +-</p><p>.../Authentication.cs | 2 ++</p><p>3 files changed, 7 insertions(+), 1 deletions(-)</p><p> </p><p>diff --git a/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs b/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs</p><p>index 1c4adaa..40cff28 100644</p><p>--- a/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs</p><p>+++ b/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs</p><p>@@ -86,6 +86,10 @@ public class StreamController : BaseController</p><p> </p><p> protected bool IsUserAuthenticated()</p><p> {</p><p>+ // No authentication for streaming</p><p>+ if (!Configuration.Authentication.Streaming)</p><p>+ return true;</p><p>+</p><p> if (PlayerOpenedBy.Contains(Request.UserHostAddress) || User.Identity.IsAuthenticated)</p><p> return true;</p><p> </p><p>diff --git a/Config/Authentication.xml b/Config/Authentication.xml</p><p>index a602bf4..6ada6c7 100644</p><p>--- a/Config/Authentication.xml</p><p>+++ b/Config/Authentication.xml</p><p>@@ -1,7 +1,7 @@</p><p><?xml version="1.0" encoding="utf-8"?></p><p><Authentication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://mpextended.github.com/schema/config/Users/1"></p><p> <Enabled>true</Enabled></p><p>- </p><p>+ <Streaming>true</Streaming></p><p> <Users></p><p> <User></p><p> <Username>admin</Username></p><p>diff --git a/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs b/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs</p><p>index 9306ab4..147ef9d 100644</p><p>--- a/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs</p><p>+++ b/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs</p><p>@@ -57,6 +57,8 @@ public class Authentication</p><p> {</p><p> public bool Enabled { get; set; }</p><p> </p><p>+ public bool Streaming { get; set; }</p><p>+</p><p> [XmlArray(Namespace = "http://mpextended.github.com/schema/config/Users/1", ElementName = "Users")]</p><p> [XmlArrayItem(ElementName = "User")]</p><p> public List<User> Users { get; set; }</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="hkjensen, post: 940365, member: 52267"] Hi Since MediaPortal experimental IPTV filter can't handle authentication I like would like to propose the following feature: Disable Authentication for Streaming - when a stream is requested ex [url]http://xxx.xxx.xx:8080/Stream/TV?item=1012&transcoder=IPTV[/url] - Check if authentication for streaming is disabled - if disabled begin streaming - else redirect to login page (normal behavior) Requires only changes to 3 files: Changes: [CODE] .../Controllers/StreamController.cs | 4 ++++ Config/Authentication.xml | 2 +- .../Authentication.cs | 2 ++ 3 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs b/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs index 1c4adaa..40cff28 100644 --- a/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs +++ b/Applications/MPExtended.Applications.WebMediaPortal/Controllers/StreamController.cs @@ -86,6 +86,10 @@ public class StreamController : BaseController protected bool IsUserAuthenticated() { + // No authentication for streaming + if (!Configuration.Authentication.Streaming) + return true; + if (PlayerOpenedBy.Contains(Request.UserHostAddress) || User.Identity.IsAuthenticated) return true; diff --git a/Config/Authentication.xml b/Config/Authentication.xml index a602bf4..6ada6c7 100644 --- a/Config/Authentication.xml +++ b/Config/Authentication.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Authentication xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://mpextended.github.com/schema/config/Users/1"> <Enabled>true</Enabled> - + <Streaming>true</Streaming> <Users> <User> <Username>admin</Username> diff --git a/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs b/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs index 9306ab4..147ef9d 100644 --- a/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs +++ b/Libraries/MPExtended.Libraries.Service.Config/Authentication.cs @@ -57,6 +57,8 @@ public class Authentication { public bool Enabled { get; set; } + public bool Streaming { get; set; } + [XmlArray(Namespace = "http://mpextended.github.com/schema/config/Users/1", ElementName = "Users")] [XmlArrayItem(ElementName = "User")] public List<User> Users { get; set; } [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
MPExtended
Disable Streaming Authentication
Contact us
RSS
Top
Bottom