Package com.google.nigori.common.NigoriMessages

Examples of com.google.nigori.common.NigoriMessages.UnregisterRequest


    return fromJson(json, RegisterRequest.class);
  }

  public static UnregisterRequest unregisterRequestAsProtobuf(String serverName, DSASign signer) throws NigoriCryptographyException {

    UnregisterRequest req = UnregisterRequest.newBuilder()
        .setAuth(authenticateRequestAsProtobuf(serverName, signer, REQUEST_UNREGISTER))
        .build();

    return req;
  }
View Full Code Here


    @Override
    public void handle(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
        IOException, UnauthorisedException, JsonConversionException {
      String json = getJsonAsString(req, maxJsonQueryLength);
      UnregisterRequest request = MessageLibrary.unregisterRequestFromJson(json);

      boolean success = protocol.unregister(request);
      if (!success) {
        throw new ServletException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Removing user "
            + Base64.encodeBase64String(request.getAuth().getPublicKey().toByteArray()) + " failed");
      }
      emptyBody(resp);
    }
View Full Code Here

TOP

Related Classes of com.google.nigori.common.NigoriMessages.UnregisterRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.