Pregunta a l'IA
Hola! Pregunta'm qualsevol cosa

Persona implementation using Java, the whole story

Blog
21/12/13
Lluis Turró Cutiller
29.628
3
java persona

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:

BrightSide introduces Persona, a Single Sign On system developed and hosted at Mozilla

New & Noteworthy
16/12/13
Lluis Turró Cutiller
18.884
0
persona

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.

Sign once, be recognized ever

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 implementation of Persona

BrightSide allows and recomends using Persona to sign into the system. Major benefits:

  • Sign without password, but with your email. Persona takes care of asking, whether necessary, the Persona password.
  • Verify your identity using your own email.
  • Long term sessions.
  • Sign in and out of web sites separately. Persona remembers where the session was audited.
  • Sign up in less than one minute, manage your account in Persona's site.
  • Single account, multiple web sites.

How it works

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.

Update: the article about Persona implementation is here Persona implementation using Java, the whole story.

Learn more about Persona at https://login.persona.org.

Usant BrightSide Dossiers com a control de mocions i esmenes

Blog
21/10/13
Lluis Turró Cutiller
16.781
0
dossiers

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.

Flux de treball

Crear la moció

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ó.

Modificacions a la documentació

Tots els participants poden afegir i modificar documentació. Els canvis fets en el tema queden registrats i es notifiquen als participants.

Votant la moció

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ó.

Publicant les mocions

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ó.

Interès i comentaris a mocions per part de la comunitat

La part pública de la moció a la web de la fundació permet aportar informació a la comunitat registrada i a visitants eventuals.

Vots informals

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.

Comentant la moció

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ó.

Web interface as entity attribute, entities explained and exposed to community

New & Noteworthy
2/9/13
Lluis Turró Cutiller
18.296
1
BaaS

BrightSide adds a new web interface for the whole set of entities, but... what do we call web interface?

Following the plugin pattern to entities

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?

  • Description, multiple descriptions. Easy to edit, no HTML acknowledge required.
  • Comments, moderated.
  • Stars, gathering interest from readers. Single user or IP tracking.
  • Votes, positive, negative or none. Contact vote tracking.

Entenent el servei BaaS i com afecta la meva empresa

Customer Relationship
2/9/13
Lluis Turró Cutiller
16.621
0
BaaS

BaaS és el nom donat al servei de hosting de BrightSide dins el cloud. BaaS és BrightSide as a Service.

Quins avantatges proporciona BaaS a la meva empresa?

BaaS és proveeix del software de la Fundació TiC per oferir al usuari totes les noves característiques que es van desenvolupant.

Estic aprofitant aquestes avantatges?

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:

  • Pàgines fàcilment modificables, sense coneixement de HTML.
  • Publicacions amb comentaris moderats, enviades per email a subscriptors.
  • Conectat amb xarxes socials via RSS i Atom.
  • Galeries d'imatges amb plugins gratuits inclosos.

BrightSide també afegeix interacció amb clients, proveïdors i collaboradors:

  • Enviament de factures per email amb un sol click.
  • Estat de comptes amb clients i proveïdors, extracte de documents on poden consultar el seu saldo i descarregar documents.
  • Estat de les feines fetes amb seguiment d'estats.
  • Base documental per compartir arxius, amb seguiment de càrregues i descàrregues.
  • Calendari comú, un calendari, múltiples fonts d'events autogenerats del dia a dia.

Canviem la pregunta, està aprofitant tots aquests avantatges?

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.

support@turro.org