code: static Map<String, Object> parseAssertion(String assertion) {
          // https://github.com/mozilla/id-specs/blob/prod/browserid/index.md
          // http://self-issued.info/docs/draft-jones-json-web-token-04.html
  
          Map<String, Object> result = new HashMap<String, Object>();
  
          String[] components = assertion.split("\\.");  // split on "."
          if (components.length < 4)
              throw new IllegalArgumentException(String.format(Locale.ENGLISH,
                      "Invalid assertion given, only %d found. Expected 4+", components.length));
  
          Map<?, ?> body = decodeComponent(components[1]);
          Map<?, ?> principal = (Map<?, ?>) body.get("principal");
          result.put(ASSERTION_FIELD_EMAIL, principal.get("email"));
  
          body = decodeComponent(components[3]);
          result.put(ASSERTION_FIELD_ORIGIN, body.get("aud"));
  
          Long expObject = (Long) body.get("exp");
          Date expDate = new Date(expObject.longValue());
          result.put(ASSERTION_FIELD_EXPIRATION, expDate);
  
          return result;
      }
docs: /*package