Thanks, that's almost exactly what I wanted. ;) However I only want to check for username/password if the Client wants to *publish* a stream. Playing streams should still be able without a password.
Junior schrieb: > A corretion: > If the connection is not to be allowed, you can call the method rejectClient > instead return false. > > ----- Original Message ----- > From: "Junior" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Monday, February 26, 2007 5:53 PM > Subject: Re: [Red5] Access control? > > >> Hello there, >> >> You can pass parameters to the server when you connect to it like this: >> >> // FLA file >> rtmp_nc.connect('rtmp://127.0.0.1/yourapplication/', username, password); >> >> So you read those parameters in the method appConnect from your AppAdapter >> derived class. If that method returns true, the connection is accepted >> otherwise the connection is rejected and the client will not be able to >> publish any streams in your server: >> >> public class YourApplication extends ApplicationAdapter { >> public boolean appConnect(IConnection conn, Object[] params) { >> // checkAccount returns true if the pair (username, password) is >> valid or false otherwise >> return checkAccount(params[0].toString(), params[1].toString()); >> } >> } >> >> In the example above, checkAccount could check if its parameters (username >> and password) is a valid pair accessing a database, a webservice, etc. >> >> ----- Original Message ----- >> From: "Timon Reinhard" <[EMAIL PROTECTED]> >> To: <[email protected]> >> Sent: Monday, February 26, 2007 5:17 PM >> Subject: [Red5] Access control? >> >> >>> Hi! >>> >>> Is there some way to implement kind of a primitive access control >>> (especially for oflaDemo)? I really don't want anybody to publish >>> streams through my server ;-) >>> >>> Any hint where to start? >>> >>> Thanks. >>> Timon >>> >>> _______________________________________________ >>> Red5 mailing list >>> [email protected] >>> http://osflash.org/mailman/listinfo/red5_osflash.org >> >> _______________________________________________ >> Red5 mailing list >> [email protected] >> http://osflash.org/mailman/listinfo/red5_osflash.org > > > _______________________________________________ > Red5 mailing list > [email protected] > http://osflash.org/mailman/listinfo/red5_osflash.org > -- Netnoise Medienproduktion Timon Reinhard & Volker Löw GbR Erbacher Str. 41 - 64756 Mossautal T: +49-(0)1805-801250 (0,14 €/min) F: +49-(0)1805-801260 (0,14 €/min) http://www.netnoise.de _______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
