How to create a login page for BigBlueButton

2,014 views
Skip to first unread message

Fred Dixon

unread,
Feb 14, 2010, 9:09:24 PM2/14/10
to BigBlueButton-dev
We've been phasing out the Grails bbb-web application in favor of using the API.  A common request is how to create a login page.

We've added an API example that demonstrates how to create a login page with passwords.


All settings for the meeting are defined within the JSP page, which means you can host these JSP pages on a different server than the BigBlueButton server (something that wasn't possible to do with the Grails bbb-web application).

If you look at the source for demo3.jsp, you'll see a number of courses (meetings) defined using a HashMap.  

meeting = new HashMap<String, String>();
allMeetings.put( "ENGL-2213: Drama Production I", meeting );
meeting.put("welcomeMsg", welcome);
meeting.put("moderatorPW", "prof123");
meeting.put("viewerPW", "student123");
meeting.put("voiceBridge", "82213");
meeting.put("logoutURL", "/bigbluebutton/demo/demo3.jsp");

If you setup your own BigBlueButton server, you can copy these pages (located in /var/lib/tomcat6/webapps/bigbluebutton/demo/) and change them to define your own meetings with passwords.   You'll need a Java Servlet Container to run these pages.

The API demo3.jsp also uses the logoutURL so that you can control where users are redirected after they logout from the BigBlueButton client.

If anyone out there is a PHP wiz, we're looking for a volunteer to convert the JSP API demo pages into their PHP equivalents for release in 0.64. 

Regards,.. Fred

DJP

unread,
Feb 15, 2010, 3:36:15 AM2/15/10
to BigBlueButton-dev
Hi Fred,

I'll handle the PHP part !

DJP

Fred Dixon

unread,
Feb 15, 2010, 9:04:11 AM2/15/10
to BigBlueButton-dev
Thanks!!

Regards,... Fred

DJP

unread,
Feb 17, 2010, 7:22:22 AM2/17/10
to BigBlueButton-dev
Hi there,

Jeremy, I've got a question for you. I've made PHP Scripts, but I ran
into a security issue using the AJAX call. (This is the same with any
other dev language we will create in future)

I tested my PHP demo API file on a different domain like "xxx.com",
while BBB runs on a VM "192.168.x.x" and when I call isMeetingRunning
using AJAX, I've cross domain security issues.

We have different solutions to fix this:
- NGINX throught fastCGI to process thoses PHP files => Not good to
me.Many users would like to have their API controller on another
domain/server.
- Handling OPTIONS request + Access-Control-Request header => Seems
good to me, but only recent browser like Firefox 3.x and IE8 can do
that. (OPTIONS request with headers => Access-Control-Request-Method:
GET / Access-Control-Request-Headers: x-requested-with. But I don't
know how to make the groovy apps API to handle OPTIONS request so it
can send back the "Access-Control-Allow-Origin: *" header. Any idea ?
- Create an internal "gateway" using a PHP Proxy Script which request
to tomcat server internally, and the ajax request this PHP proxy
script located on the same domain => Crossbrowser and fully working
but lame ^^

For the others, any other idea ? What do you think is best ?

Thanks,
DJP


On 15 fév, 15:04, Fred Dixon <ffdi...@gmail.com> wrote:
> Thanks!!
>
> Regards,... Fred
>
> On Feb 15, 3:36 am, DJP <D...@architectes.org> wrote:
>
>
>
> > Hi Fred,
>

> > I'll handle thePHPpart !

> > > If anyone out there is aPHPwiz, we're looking for a volunteer to convert
> > > the JSP API demo pages into theirPHPequivalents for release in 0.64.
>
> > > Regards,.. Fred

Fred Dixon

unread,
Feb 17, 2010, 7:37:40 AM2/17/10
to BigBlueButton-dev
Hi DJP,

Is it an option to have the PHP code running on the server call
isMeetingRunning() directly?

The browser can, in turn, call the PHP code to get the return result
from isMeetingRunning() from the BigBlueButton server.

Regards,... Fred

DJP

unread,
Feb 17, 2010, 8:13:53 AM2/17/10
to BigBlueButton-dev
Hi Fred,

Yep, that was my third solution : a PHP proxy script. I think that's
the best we can do to be fully cross browser compliant and working.
Even if it consume more ressources and create more possible point of
failure since it's not direct.

A while after writing my previous post, i thought too this was the
best solution. This means, each new API languages will have to create
this proxy script compared to the jsp examples.

I'll finish the PHP API Example with that PHP proxy script, commit,
and I'll do the Python API script. (Django, Plone, ...)

Oh, and where can I commit thoses PHP files on the SVN ? Any prefered
destination folder ?

Thanks for your thought,
DJP


On 17 fév, 13:37, Fred Dixon <ffdi...@gmail.com> wrote:
> Hi DJP,
>

> Is it an option to have thePHPcode running on the server call
> isMeetingRunning() directly?
>
> The browser can, in turn, call thePHPcode to get the return result


> from isMeetingRunning() from the BigBlueButton server.
>
> Regards,... Fred
>
> On Feb 17, 7:22 am, DJP <D...@architectes.org> wrote:
>
>
>
> > Hi there,
>

> > Jeremy, I've got a question for you. I've madePHPScripts, but I ran


> > into a security issue using the AJAX call. (This is the same with any
> > other dev language we will create in future)
>

> > I tested myPHPdemo API file on a different domain like "xxx.com",


> > while BBB runs on a VM "192.168.x.x" and when I call isMeetingRunning
> > using AJAX, I've cross domain security issues.
>
> > We have different solutions to fix this:

> > - NGINX throught fastCGI to process thosesPHPfiles => Not good to


> > me.Many users would like to have their API controller on another
> > domain/server.
> > - Handling OPTIONS request + Access-Control-Request header => Seems
> > good to me, but only recent browser like Firefox 3.x and IE8 can do
> > that. (OPTIONS request with headers => Access-Control-Request-Method:
> > GET / Access-Control-Request-Headers: x-requested-with. But I don't
> > know how to make the groovy apps API to handle OPTIONS request so it
> > can send back the "Access-Control-Allow-Origin: *" header. Any idea ?

> > - Create an internal "gateway" using aPHPProxy Script which request

Fred Dixon

unread,
Feb 17, 2010, 9:32:27 AM2/17/10
to BigBlueButton-dev
Hi DJP,

That's great! You can check them at

/trunk/bbb-api-examples/php

At some point we'll move of the jsp examples into

/trunk/bbb-api-examples/jsp

And follow the same format for others.

Regards,... Fred

Jeremy Thomerson

unread,
Feb 17, 2010, 10:00:41 PM2/17/10
to bigblueb...@googlegroups.com
Please see my responses on this thread:
http://groups.google.com/group/bigbluebutton-dev/browse_thread/thread/8883f744f763e6bb#

I think it's much better to allow the JS to call the API directly because you end up building less layers of abstraction.  It's easy to do - you simply need to use JS that's loaded from the BBB server in order to do it.  If we wanted to, we could include a jQuery file and a JS file that I use to do this with the standard bbb-web install, which would make it simpler for clinets of any language to integrate with.

Jeremy Thomerson

>
> > > Regards,.. Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To post to this group, send email to bigblueb...@googlegroups.com.
To unsubscribe from this group, send email to bigbluebutton-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bigbluebutton-dev?hl=en.


DJP

unread,
Feb 18, 2010, 6:23:42 AM2/18/10
to BigBlueButton-dev
Hi All,

Jeremy, I agree with you but I just commit a first example using PHP
Proxy. No problem to me to change JS location so we can reach directly
BBB server.
I have 2 lines to comment and 2 to modify to acheive what you said ;-)
Any idea where are/will be stored those 2 files so I modify my
scripts ?

You can check out http://code.google.com/p/bigbluebutton/source/browse/trunk/bbb-api-examples/
for the PHP Api example. I'll do the Python one later.

DJP

On 18 fév, 04:00, Jeremy Thomerson <jeremythomer...@gmail.com> wrote:
> Please see my responses on this thread:http://groups.google.com/group/bigbluebutton-dev/browse_thread/thread...

> > bigbluebutton-...@googlegroups.com<bigbluebutton-dev%2Bunsubscr i...@googlegroups.com>

Jeremy Thomerson

unread,
Feb 18, 2010, 10:10:24 AM2/18/10
to bigblueb...@googlegroups.com
They would just need to go anywhere on the BBB server - I deploy them in the same place as bbb-web so that nginx can serve them (i.e. /var/www/bigbluebutton-default/myjs)

Jeremy

To unsubscribe from this group, send email to bigbluebutton-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages