Hi Again!
Le 6 novembre 2011 12:26, Alexander <[email protected]> a écrit :
> My idea was to provide users ability to use their login/password from the
> website in streamer for live broadcasts.
>
> I found this tutorial for harbour implementation:
> http://wiki.sourcefabric.org/display/LS/Harbor+mysql+authentication
>
> It is VERY cool, but, i found some problems.
> SCENARIO DESCRIPTION:
> 1. User enters his $login into "mountID" field &
> $password into "password" fields in the streamer.
> 2. User connects to the harbour.
>
> PROBLEMS: in the check_client(user,password) function, "user"
> parameter is always equal string "source". if i don't specify the 1st
> parameter for input.harbour, compiler displays to me an error: If while
> loggin in the first parameter for input.harbour differs value user has in
> the streamer "mountID" field connection fails...
>
> QUESTIONS: Is there a way to provide users ability to log in by
> login/password to the harbour... and
> how can i do this?
This actually depends on the source client used to connect to the
harbor. We (liquidsoap) accept any combination of login and password
but most source clients restrict login to be "source", which is why
you always see "source". Also, ICY/shoutcast source protocol only has
password field and no user/login. In this case, liquidsoap uses
"source" by default -- or perhaps the "user" parameter passed to
input.harbor (default: "source")
> How can i check not only password but login & password together?
They are always checked together, or else I do not understand the question..
> How can i specify input.harbour without first parameter?
If you mean the login function, you cannot.
By the way, concerning mountpoint and authentication function, you can
have a different mountpoint for different input.harbor using a
partical composition:
def auth(mount, user, login) =
log("authenticating for mount #{mount}")
(.. auth logic here ..)
end
s1 = input.harbor("foo", auth=auth("foo"), ...)
s2 = input.harbor("bar", auth=auth("bar"), ...)
In the above, auth("foo") is the auth function with first parameter
already applied.
Romain
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users