diff --git a/bbb-api-demo/src/main/webapp/demo6.jsp b/bbb-api-demo/src/main/webapp/demo6.jsp deleted file mode 100644 index 7a094550aa8b48ba6b389b068e77a6cfc6b34625..0000000000000000000000000000000000000000 --- a/bbb-api-demo/src/main/webapp/demo6.jsp +++ /dev/null @@ -1,173 +0,0 @@ -<!-- - -BigBlueButton - http://www.bigbluebutton.org - -Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - -BigBlueButton is free software; you can redistribute it and/or modify it under the -terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - -Author: Fred Dixon <ffdixon@bigbluebutton.org> - ---> - -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<% - request.setCharacterEncoding("UTF-8"); - response.setCharacterEncoding("UTF-8"); -%> -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <title>Record (Matterhorn)</title> - <style type="text/css"> - #formcreate{ - width:500px; - height:500px; - } - #formcreate ul{ - list-style:none; - } - #formcreate li{ - display:block; - width:400px; - margin-bottom:5px; - } - #formcreate label{ - display:block; - float:left; - width:150px; - text-align:right; - } - #labdescription{ - vertical-align:top; - } - </style> -</head> -<body> - - -<%@ include file="bbb_api.jsp"%> -<%@ include file="demo_header.jsp"%> - -<% - if (request.getParameterMap().isEmpty()) { - // - // Assume we want to create a meeting - // -%> - <h2>Record (Matterhorn)</h2> - - <form id="formcreate" name="formcreate" method="get" action=""> - <fieldset> - <legend>Meeting Information</legend> - <ul> - <li> - <label for="confname">Meeting Name:</label> - <input id="confname" autofocus required name="confname" type="text" /> - </li> - <li> - <label for="username1">Your Name:</label> - <input id="username1" required name="username1" type="text" /> - </li> - </ul> - </fieldset> - <fieldset> - <legend>Metadata Details</legend> - <ul> - <li> - <label for="meta_title">Title:</label> - <input type="text" id="meta_title" name="meta_title" /> - </li> - <li> - <label for="meta_subject">Subject:</label> - <input type="text" id="meta_subject" name="meta_subject" /> - </li> - <li> - <label id="labdescription" for="meta_description">Description:</label> - <textarea id="meta_description" name="meta_description" cols="17" rows="3"></textarea> - </li> - <li> - <label for="meta_creator">Creator:</label> - <input type="text" id="meta_creator" name="meta_creator" /> - </li> - <li> - <label for="meta_contributor">Contributor:</label> - <input type="text" id="meta_contributor" name="meta_contributor" /> - </li> - <li> - <label for="meta_language">Language:</label> - <input type="text" id="meta_language" name="meta_language" /> - </li> - <li> - <label for="meta_identifier">Identifier:</label> - <input type="text" id="meta_identifier" name="meta_identifier" /> - </li> - </ul> - </fieldset> - <input type="submit" value="Create" > - <input type="hidden" name="action" value="create" /> - </form> - -<% - } else if (request.getParameter("action").equals("create")) { - - String confname = request.getParameter("confname"); - String username = request.getParameter("username1"); - - //metadata - Map<String,String> metadata=new HashMap<String,String>(); - - metadata.put("title",request.getParameter("meta_title")); - metadata.put("subject",request.getParameter("meta_subject")); - metadata.put("description",request.getParameter("meta_description")); - metadata.put("creator",request.getParameter("meta_creator")); - metadata.put("contributor",request.getParameter("meta_contributor")); - metadata.put("language",request.getParameter("meta_language")); - metadata.put("identifier",request.getParameter("meta_identifier")); - - // - // This is the URL for to join the meeting as moderator - // - String url = BigBlueButtonURL.replace("bigbluebutton/","demo/"); - String preUploadPDF = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='"+url+"pdfs/matterhorn.pdf'/></module></modules>"; - String joinURL = getJoinURL(username, confname, "true", null, metadata, preUploadPDF); - - if (joinURL.startsWith("http://") || joinURL.startsWith("https://")) { -%> - -<script language="javascript" type="text/javascript"> - window.location.href="<%=joinURL%>"; -</script> - -<% - } else { -%> - -Error: getJoinURL() failed -<p/> -<%=joinURL %> - -<% - } -} -%> - -<p> -See: <a href="http://code.google.com/p/bigbluebutton/wiki/MatterhornIntegration">Matterhorn Integration</a> - -<%@ include file="demo_footer.jsp"%> - -</body> -</html> diff --git a/bbb-api-demo/src/main/webapp/demoHTML5.jsp b/bbb-api-demo/src/main/webapp/demoHTML5.jsp index 1fe4e1626ab77fd5a0cf3510a123c2598b0da2e7..0333ba4225617675d5408d3c161dc451fe403e4c 100644 --- a/bbb-api-demo/src/main/webapp/demoHTML5.jsp +++ b/bbb-api-demo/src/main/webapp/demoHTML5.jsp @@ -35,6 +35,8 @@ Author: Fred Dixon <ffdixon@bigbluebutton.org> <body> +You must have the BigBlueButton HTML5 client installed to use this API demo. + <%@ include file="bbb_api.jsp"%> <% diff --git a/bbb-api-demo/src/main/webapp/demo_header.jsp b/bbb-api-demo/src/main/webapp/demo_header.jsp index 74bfa7b2596f9171edf3323efe5a398722dd2f50..4dd1bafdbae8fb4f63b563a93059b7e36ccaa31f 100755 --- a/bbb-api-demo/src/main/webapp/demo_header.jsp +++ b/bbb-api-demo/src/main/webapp/demo_header.jsp @@ -1,13 +1,12 @@ -<img src="images/bbb_banner.jpg" /><br> +<img src="images/bbb_banner.jpg" /><br> <a href="demo1.jsp">Join</a> | -<a href="demo2.jsp">Join Selected</a> | +<a href="demo2.jsp">Join Selected</a> | <a href="demo3.jsp">Join Password</a> <a href="demo7.jsp">Join & Upload</a> | <a href="demo8.jsp">Join & Upload</a> (URL) -<a href="demo10.jsp">Record</a> | -<a href="demo6.jsp">Record</a> (Matterhorn) +<a href="demo10.jsp">Record</a> | <a href="create.jsp">Create</a> @@ -15,12 +14,9 @@ <a href="demo4.jsp">Activity Monitor</a> -<a href="demo_mozilla_persona.jsp">Login with Persona</a> - -<a href="demo_openid.jsp">Login with Openid</a> - <a href="demo11.jsp">Javascript API</a> <a href="mobile.jsp">Mobile Demo</a> <a href="demoHTML5.jsp">HTML5 Client Demo</a> + diff --git a/bbb-api-demo/src/main/webapp/demo_mozilla_persona.jsp b/bbb-api-demo/src/main/webapp/demo_mozilla_persona.jsp deleted file mode 100644 index 83ef01eaae896e765e45c893915838e342c769df..0000000000000000000000000000000000000000 --- a/bbb-api-demo/src/main/webapp/demo_mozilla_persona.jsp +++ /dev/null @@ -1,169 +0,0 @@ -<!-- - -BigBlueButton - http://www.bigbluebutton.org - -Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - -BigBlueButton is free software; you can redistribute it and/or modify it under the -terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with BigBlueButton; if not, If not, see <http://www.gnu.org/licenses/>. - -Author: Marcos Calderon <mcmarkos86@gmail.com> - ---> - -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<% - request.setCharacterEncoding("UTF-8"); - response.setCharacterEncoding("UTF-8"); -%> -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <title>Join Demo Meeting using Mozilla Persona</title> - <script src="https://login.persona.org/include.js" type="text/javascript"></script> - <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> -</head> - -<body> - -<%@ include file="bbb_api.jsp"%> -<%@ page import="com.google.gson.Gson"%> -<%@ page import="com.google.gson.reflect.TypeToken"%> - -<% -if (request.getParameterMap().isEmpty()) { - // - // Assume we want to create a meeting - // - %> -<%@ include file="demo_header.jsp"%> - -<script type="text/javascript"> -//browserid -$(function() { - $('#browserid').click(function() { - navigator.id.get(gotAssertion); - return false; - }); -}); - -function gotAssertion(assertion) { - if (assertion) { - var assertion_field = document.getElementById("assertion-field"); - assertion_field.value = assertion; - var login_form = document.getElementById("form1"); - login_form.submit(); - } -} - -function loggedIn(res){ - alert(res.email); -} - -</script> - -<h2>Join Demo Meeting using BrowserID (<a href="http://mozilla.org/persona/">Mozilla Persona</a>)</h2> - - -<FORM id="form1" NAME="form1" METHOD="GET"> -<table cellpadding="5" cellspacing="5" style="width: 400px; "> - <tbody> - <tr> - <td> - </td> - <td style="text-align: left "> - <a href="#" id="browserid" title="Sign-in with BrowserID"> - <img src="https://browserid.org/i/sign_in_blue.png" alt="Sign in"> - </a> - </td> - </tr> - </tbody> -</table> -<INPUT TYPE=hidden NAME=action VALUE="create"> -<input type="hidden" name="assertion" id="assertion-field" /> -</FORM> - - -<% -} else if (request.getParameter("action").equals("create")) { - - // - // Got an action=create - // - - String url = BigBlueButtonURL.replace("bigbluebutton/","demo/"); - String joinURL = ""; - - try{ - - String data = URLEncoder.encode("assertion", "UTF-8") + "=" + URLEncoder.encode(request.getParameter("assertion"), "UTF-8"); - data += "&" + URLEncoder.encode("audience", "UTF-8") + "=" + URLEncoder.encode(BigBlueButtonURL.replace("/bigbluebutton/",""),"UTF-8"); - URL urlBrowserID = new URL("https://verifier.login.persona.org/verify"); - - - URLConnection conn = urlBrowserID.openConnection(); - ((HttpURLConnection)conn).setRequestMethod("POST"); - conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - conn.setDoOutput(true); - OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); - wr.write(data); - wr.flush(); - - // Get the response - BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); - String jsonResp = ""; - String line; - while ((line = rd.readLine()) != null) { - jsonResp += line; - } - wr.close(); - rd.close(); - - Gson gson = new Gson(); - HashMap<String,String> map = gson.fromJson(jsonResp, new TypeToken<Map<String, String>>() {}.getType()); - if(map.get("status").equalsIgnoreCase("okay")){ - joinURL = getJoinURL(map.get("email"), "Demo Meeting", "false", null, null, null); - } - }catch(Exception e){ - - } - - // String preUploadPDF = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='"+url+"pdfs/sample.pdf'/></module></modules>"; - - - if (joinURL.startsWith("http://") || joinURL.startsWith("https://")) { -%> - -<script language="javascript" type="text/javascript"> - window.location.href="<%=joinURL%>"; -</script> - -<% - } else { -%> - -Error: getJoinURL() failed -<p/> -<%=joinURL %> - -<% - } -} -%> - - -<%@ include file="demo_footer.jsp"%> - -</body> -</html> diff --git a/bbb-api-demo/src/main/webapp/demo_openid.jsp b/bbb-api-demo/src/main/webapp/demo_openid.jsp deleted file mode 100644 index 757a79e2eaf9b2257f19f262bcf0379b4de893cb..0000000000000000000000000000000000000000 --- a/bbb-api-demo/src/main/webapp/demo_openid.jsp +++ /dev/null @@ -1,166 +0,0 @@ -<!-- - -BigBlueButton - http://www.bigbluebutton.org - -Copyright (c) 2008-2009 by respective authors (see below). All rights reserved. - -BigBlueButton is free software; you can redistribute it and/or modify it under the -terms of the GNU Lesser General Public License as published by the Free Software -Foundation; either version 3 of the License, or (at your option) any later -version. - -BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. - -Author: Jesus Federico <jesus@123it.ca> - ---> - -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<% - request.setCharacterEncoding("UTF-8"); - response.setCharacterEncoding("UTF-8"); -%> -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<title>Join Demo Meeting using OpenID</title> -<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> -<script type="text/javascript"> - $(function() { - var form = $('#form1'); - $('#google').click(function() { - $("<input>").attr({ - 'type':'hidden', - 'name':'connect', - 'value':'google' - }).appendTo(form); - $('#form1').submit(); - return false; - }); - $('#yahoo').click(function() { - $("<input>").attr({ - 'type':'hidden', - 'name':'connect', - 'value':'yahoo' - }).appendTo(form); - $('#form1').submit(); - return false; - }); - $('#custom').click(function() { - $("<input>").attr({ - 'type':'hidden', - 'name':'connect', - 'value':'custom' - }).appendTo(form); - $('#form1').submit(); - return false; - }); - }); -</script> -</head> -<body> - -<%@ include file="bbb_api.jsp"%> -<%@ include file="bbb_jopenid.jsp"%> - -<% -String urlPath = request.getRequestURI(); -String urlHost = new URL(BigBlueButtonURL).getProtocol() + "://" + new URL(BigBlueButtonURL).getAuthority(); - -if (request.getParameterMap().isEmpty()) { - // - // Assume we want to create a meeting - // -%> -<%@ include file="demo_header.jsp"%> - -<h2>Join Demo Meeting using openID</h2> - -<FORM id="form1" NAME="form1" METHOD="GET" ACTION="#"> -<table cellpadding="5" cellspacing="5" style="width: 400px; "> - <tbody> - <tr> - <td> </td> - <td style="text-align: left "> - <a href="#" id="yahoo" title="Sign-in with Yahoo OpenID"> - <img src="images/yahoo.png" alt="Sign in"></br> - </a> - </td> - </tr> - <!-- - <tr> - <td> </td> - <td style="text-align: left "> - <a href="#" id="custom" title="Sign-in with Custom OpenID"> - <img src="images/openid.png" alt="Sign in"></br> - </a> - </td> - </tr> - --> - </tbody> -</table> -</FORM> - -<% -} else if (request.getParameter("connect")!=null ) { - manager.setRealm(urlHost); - manager.setReturnTo(urlHost + urlPath); - Endpoint endpoint = null; - - if (request.getParameter("connect").equals("google")) { - endpoint = manager.lookupEndpoint("Google"); - - } else if (request.getParameter("connect").equals("yahoo")) { - endpoint = manager.lookupEndpoint("Yahoo"); - - } else if (request.getParameter("connect").equals("custom")) { - endpoint = manager.lookupEndpoint("Google"); - //endpoint = manager.lookupEndpoint("Custom"); - - } - - Association association = manager.lookupAssociation(endpoint); - request.getSession().setAttribute(ATTR_MAC, association.getRawMacKey()); - request.getSession().setAttribute(ATTR_ALIAS, endpoint.getAlias()); - String url = manager.getAuthenticationUrl(endpoint, association); - response.sendRedirect(url); - -} else if (request.getParameter("openid.ns")!=null && !request.getParameter("openid.ns").equals("")) { - - byte[] mac_key = (byte[]) request.getSession().getAttribute(ATTR_MAC); - String alias = (String) request.getSession().getAttribute(ATTR_ALIAS); - Authentication authentication = manager.getAuthentication(request, mac_key, alias); - String joinURL = getJoinURL(authentication.getFullname(), "Demo Meeting", null, null, null, null ); - - if (joinURL.startsWith("http://") || joinURL.startsWith("https://")) { -%> - -<script language="javascript" type="text/javascript"> - window.location.href="<%=joinURL%>"; -</script> - -<% - } else { -%> - -Error: getJoinURL() failed -<p/> -<%=joinURL %> - -<% - } -} -%> - - -<%@ include file="demo_footer.jsp"%> - -</body> -</html>