I decided to publish Persona implementation mainly because wasn't as easy as explained in Persona site. Also because is lacking of Java code, at least, Java code with no-so-much dependencies.
Follow the instructions found in Quick Setup at Persona site. Notice that the instructions provide best practices for including Persona dependencies. When finished, come back here and prepare for Persona implemented in your Java code.
Lets begin with the easy part, the Java Script code. This is the persona.js file. The example uses JQuery.
/*stands for context path on servlets nomenclature*/ var webRoot = ""; /*persona wants to know who is signed in*/ var currentMail = null; /*for app servers running on different ports*/ var webPort = 80; /*did user signed in without persona*/ var internalSignIn = false; /*should we reload current page */ var reloadSignIn = false; $(document).ready(function() { loadElephant(); if(!internalSignIn) { navigator.id.watch({ loggedInUser: currentMail, onlogin: function(assertion) { $.ajax({ type: 'POST', url: webRoot + '/auth/login', port: webPort, data: {assertion: assertion}, success: function(res, status, xhr) { if(reloadSignIn) { window.location.href = window.location.href; } }, error: function(xhr, status, err) { navigator.id.logout(); } }); }, onlogout: function() { $.ajax({ type: 'POST', url: webRoot + '/auth/logout', port: webPort, success: function(res, status, xhr) { window.location.href = window.location.href; }, error: function(xhr, status, err) { } }); } }); } });
Notice the use of some variables that will make your coding more useful in the long term. OK, now we dive into their use and how to get them initialized:
OpenID has been the SSO universally accepted in social networks, once accepted that not everyone using it kwew what was this all about. Persona, formerly BrowserId, irrupted in SSO world with force, simplicity and open sourced. The ingredients seem perfect to atract developer interes.
That's what we expect from an SSO, not being asked every time for our nick name and password. The fact that security is one of the main factors when we sign into a system, may not be so atractive to the final user, but it is to developers. SSO systems are secured with SSL and this is a must have requirement for web based aplications.
BrightSide allows and recomends using Persona to sign into the system. Major benefits:
Persona site already has multiple examples on different languages. Anyway, I'll publish the source code with the main changes I made to achieve the implementation. I'll also try to provide an easy explanation on how the system works and which security risks you may avoid on your system.
Learn more about Persona at https://login.persona.org.
BrightSide Dossiers permet crear grups de treball mitjançant categories. Pel cas que ens ocupa, el grup de treball són els patrons de la Fundació TiC. La categoria és Fundació i el Dossier creat Mocions.
Per a crear una moció, es dona d'alta un tema dins els dossier Mocions. S'adjunta tota la documentació necessària i s'afegeix els participants que no siguin del grup de treball. Aquesta acció enviarà correus a tots els participants notificant-los la creació de la moció.
Tots els participants poden afegir i modificar documentació. Els canvis fets en el tema queden registrats i es notifiquen als participants.
Els participants poden donar el vistiplau a la moció, informació que passarà a la resta. Un cop aprovada o rebutjada, el responsable tancarà el tema positiva o negativament, segons el resultat. Els participants podran refusar la resolució obrint de nou la moció.
Les mocions es publicaran a la web de la fundació, sense mostrar el flux de treball però amb una descripció completa dels resultats i la documentació.
La part pública de la moció a la web de la fundació permet aportar informació a la comunitat registrada i a visitants eventuals.
El vot informal és pels usuaris registrats. Aquest vot informal s'utilitza per deduir l'interès que hagi pogut generar la moció dins la comunitat.
A més del vot informal, els visitants no registrats poden votar usant el sistema de cinc estrelles, que permet un vot per usuari / IP.
Els comentaris des de la web a les mocions permeten augmentar l'univers de persones que puguin aportar informació útil.
Tot i no ser part del flux de treball, si són visibles als responsables de la votació.
BrightSide adds a new web interface for the whole set of entities, but... what do we call web interface?
For a long time, BrightSide has added features to entities by using a one-for-all pattern. Thus, attachments apply to dossiers, issues, contracts, documents, sale actions, resources and so on. Same applies for acceptances, tags, calendar events...
Now, a web interface appears as an out-of-the-box feature for all entities. Well, a web interface, what do we call web interface?
BaaS és el nom donat al servei de hosting de BrightSide dins el cloud. BaaS és BrightSide as a Service.
BaaS és proveeix del software de la Fundació TiC per oferir al usuari totes les noves característiques que es van desenvolupant.
BrightSide funciona sobre la llibreria Elephant, que dona un entorn web modificable (CMS) més un munt de plugins per facilitar la comunicació amb els visitants del lloc web:
BrightSide també afegeix interacció amb clients, proveïdors i collaboradors:
Si creu que encara no utilitza tot el que BaaS li ofereix no dubti en contactar. S'han acabat les vacances i és un bon moment per donar-hi una nova empenta.