code: private void writeObject(ObjectOutputStream out) throws IOException {
          PutField fields = out.putFields();
          fields.put(PRINCIPAL, principal);
          fields.put(JWT, jwt);
          fields.put(TYPE, type);
          out.writeFields();
      }
docs: Serialize json web token.
  
  @param out
  The stream to which this object is serialized.
  
  @throws IOException