Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:old:web_portal_2012 [2013/07/10 20:53] (current)
Line 1: Line 1:
 +This page gathers progress works lead during Q1 and Q2 2012 to develop generic web portal for OAR eco-system.
 +See [[Web Portal]] proposal for the context.
 +
 +====== ​ Participants ​ ======
 +
 +  *  Benjamin Galaud: Projet M1 WIC
 +  *  Olivier Richard
 +
 +
 +====== ​ ExtJS 3 Prototype version ======
 +  *  KVM image:
 +
 +<​code>​
 +  wget http://​oar.imag.fr/​live/​oar-devel-poar-amd64.qcow2
 +  sudo kvm -m 512 -redir tcp:​2222::​22 -redir tcp:​8080::​80 ​ -redir tcp:​4343::​443 oar-devel-poar-amd64.qcow2
 +  firefox http://​localhost:​8080/​poar/​poar.htm
 +</​code>​
 +
 +====== ​ Todo  ======
 +
 +  *  Porting extj3 portal prototype to extj4
 +  *  History Support (see Ext.History in poar extjs 3 version)
 +  *  User Login and service access (see below http-basic-auth) ​
 +  *  User Preference (?)
 +  *  Coffeescript
 +  *  ...
 +====== ​ Technicals Notes ======
 +=====  http basic auth (in-ajax) =====
 +
 +<​code>​
 +  http://​coderseye.com/​2007/​how-to-do-http-basic-auth-in-ajax.html
 +  How to do HTTP Basic Auth in Ajax
 +  --------------------------------------
 +  function make_base_auth(user,​ password) {
 +    var tok = user + ':'​ + pass;
 +    var hash = Base64.encode(tok);​
 +    return "Basic " + hash;
 +  ​
 +</​code>​
 +
 +Step 3 
 +
 +Use it in your Ajax call.
 +
 +<​code>​
 +  var auth = make_basic_auth('​me','​mypassword'​);​
 +  var url = '​http://​example.com'​
 +</​code>​
 +
 +**RAW**
 +
 +<​code>​
 +  xml = new XMLHttpRequest();​
 +  xml.setRequestHeader('​Authorization',​ auth);
 +  xml.open('​GET',​url)
 +  // ExtJS
 +  Ext.Ajax.request({
 +    url : url,
 +    method : '​GET',​
 +    headers : { authorization : auth }
 +  })
 +</​code>​
 +
 +**jQuery**
 +
 +<​code>​
 +  $.ajax({
 +    url : url,
 +    method : '​GET',​
 +    beforeSend : function(req) {
 +        req.setRequestHeader('​Authorization',​ auth);
 +    }
 +  })
 +</​code>​
 +
  
wiki/old/web_portal_2012.txt ยท Last modified: 2013/07/10 20:53 (external edit)
Recent changes RSS feed GNU Free Documentation License 1.3 Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki