Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New to IceCast.. questions about authentication
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 3:00 pm    Post subject: New to IceCast.. questions about authentication Reply with quote

Ok We are new to IceCast and we are just making the switch to get the Authentication for the station. I've got the server configured and the URL authentication appears to be working but I need to have the station launch when a link is clicked on the page. Unfortunately this is launching the embedded Quicktime player in the browser (which doesn't work anyway). How can I get WinAmp or another external player to launch?

My mount is www.someurl.com:8015/chill

I took it down for now so this is just a sample link until I get it up and running.

Also I am trying to use authentication from a PHP fusion login so I'd rather IceCast just ignore asking me for a username and password and just check the URL only to see if the user is authenticated. Right now it pops up the credentials box and I don't need that.

Any help would be greatly appreciated. I see many possibilities here so I am excited.

Thanks!
-TFR
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jan 11, 2008 4:11 pm    Post subject: Reply with quote

user/pw details get be passed via the url like

http://user:pw@host:port/mountpoint

obviously with url based auth, you may use query args eg

http://host:port/mountpoint?session=12345678

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 4:16 pm    Post subject: Reply with quote

Thanks for the quick reply. So you are saying just force any username and password onto the link for now?

I guess I am trying to explain properly what I want to do. First off, why is the link launching in the browser and not an external player? The station begins to play but with quicktime embedded. I don't think its a mime/type thing, is it?

So what I am trying to do is make sure the user is logged into our website before they can launch the stream. I have that working with a php validation page but icecast is trying to use its own username and password IF the user is not logged into the website. I don't want icecast to send me authentication, I want it to just bypass and only consider the php validation page I've created. Is that possible or is there a way to suppress the credentials?

Appreciate your help!
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jan 11, 2008 4:47 pm    Post subject: Reply with quote

The link is probably the stream, not a playlist, so your browser is probably trying to handle it with a plugin. Most players don't handle authentication in as many ways as browsers, things like cookies are not handled for instance. The question is what is getting passed to verify that you are already authenticated?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 5:11 pm    Post subject: Reply with quote

karlH wrote:
The link is probably the stream, not a playlist, so your browser is probably trying to handle it with a plugin. Most players don't handle authentication in as many ways as browsers, things like cookies are not handled for instance. The question is what is getting passed to verify that you are already authenticated?

karl.


You are right it definitely is the stream. So can I create a .pls file like shoutcast and have icecast serve it up as a stream? That would solve my problem.

To verify my authentication I am using the ip address to check to see if it matches with one that is currently logged into the site. I realize there might be some flaws with that now that I think about it. I have a whole database of usernames and passwords to log into my php fusion site so if I could use that data as authentication I would be golden.
Back to top
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 5:22 pm    Post subject: Reply with quote

BTW: In case it matters I am currently relaying a shoutcast server which is the master.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jan 11, 2008 7:33 pm    Post subject: Reply with quote

You can provide a pls file in the icecast webroot if you wish

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 7:36 pm    Post subject: Reply with quote

karlH wrote:
You can provide a pls file in the icecast webroot if you wish

karl.


Ok so everything else will be the same as far as authentication, etc? I can just serve up the .pls file instead? That would be great.

How would the mount look then? server.com:8015/chill/listen.pls ??
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jan 11, 2008 8:28 pm    Post subject: Reply with quote

As the playlist name doesn't have to correspond to the mountpoint for such cases, then you can name it whatever you like. eg

http://server.com:8015/chill.pls

it can even be served from a web server.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 8:32 pm    Post subject: Reply with quote

karlH wrote:
As the playlist name doesn't have to correspond to the mountpoint for such cases, then you can name it whatever you like. eg

http://server.com:8015/chill.pls

it can even be served from a web server.

karl.


Right right, it's what's INSIDE the .pls that should point to the mount. That makes sense now. I forgot about that.
Back to top
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 8:35 pm    Post subject: Reply with quote

Ok back to the authentication. So if I just embed any old username and password it will trick the authentication credentials box? Ultimately I am getting the yes or no from the php validation page when a listener connects. I think that should do it then. Very Happy

I haven't been able to test any of this out because I am not infront of my dev tools. I've been thinking of ways to do this thats why I've been monitoring the thread regularly so I can get it all in my head once I leave here to go home. Laughing
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jan 11, 2008 8:47 pm    Post subject: Reply with quote

yes, but don't forget that your auth scripts will have very little to authenticate against if you are using a static user/pass. Usually you want the playlist to be automatically generated to create the unique details to pass to icecast and then your auth scripts.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Fri Jan 11, 2008 8:51 pm    Post subject: Reply with quote

karlH wrote:
yes, but don't forget that your auth scripts will have very little to authenticate against if you are using a static user/pass. Usually you want the playlist to be automatically generated to create the unique details to pass to icecast and then your auth scripts.

karl.


Autogenerated? I'll have to think about that. Well bottom line is I want them to avoid any popup boxes and I want to use the login information from my mysql db that is attached to our website. I am trying to make it as simple as possible for the user so basically they'll just have to log in.
Back to top
Anonymous
Guest





PostPosted: Sat Jan 12, 2008 1:39 am    Post subject: Reply with quote

Ok I think I got some stuff working here.

Question: Is it possible to have icecast serve up an mp3 file if the user is not authenticated? Instead of the stream in this instance I'd want a file launched letting the user know they need to log in. I tried setting the header on the URL to "Location: of the file.mp3" but it didn't pick it up.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Jan 12, 2008 2:54 am    Post subject: Reply with quote

Ah, that is a new feature I added into my branch work located at my website. You can add a rejected_mount option or pass back the Mountpoint: header to force a redirect within the same server.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber