Package org.openid4java.message

Examples of org.openid4java.message.Message.keyValueFormEncoding()


        if ("associate".equals(mode))
        {
            // --- process an association request ---
            response = manager.associationResponse(request);
            responseText = response.keyValueFormEncoding();
        }
        else if ("checkid_immediate".equals(mode))
        {
          String userSelectedClaimedId = (String) request.getParameter("openid.claimed_id").getValue();
         
View Full Code Here


         
            String realm = (String) request.getParameter("openid.realm").getValue();
           
            if (!isTrustedRealm(realm, userSelectedClaimedId)) {
                response = DirectError.createDirectError("checkid_immediate is not supported");
                responseText = response.keyValueFormEncoding();
                directResponse(resp, responseText);
                return;
            }
         
            // --- process an authentication request ---
View Full Code Here

                    userSelectedClaimedId,
                    true,
                    false); // Sign after we added extensions.

            if (response instanceof DirectError)
                responseText = response.keyValueFormEncoding();
            else
            {
                // Sign the auth success message.
                // This is required as AuthSuccess.buildSignedList has a `todo' tag now.
              try {
View Full Code Here

              try {
                    manager.sign((AuthSuccess) response);
              } catch (Exception ex) {
                throw new ServletException(ex);
              }
                responseText = response.keyValueFormEncoding();
            }
        }
        else
        {
          // unsupported mode
View Full Code Here

        else
        {
          // unsupported mode
            // --- error response ---
            response = DirectError.createDirectError("Unknown request");
            responseText = response.keyValueFormEncoding();
        }

        directResponse(resp, responseText);
  }
View Full Code Here

    Message responseMessage;

    if ("associate".equals(mode)) {
      // --- process an association request ---
      responseMessage = manager.associationResponse(requestParams);
      responseText.append(responseMessage.keyValueFormEncoding());
    } else if ("checkid_setup".equals(mode) ||
        "checkid_immediate".equals(mode)) {

      Boolean authenticatedAndApproved = Boolean.FALSE;
      if (session.getAttribute("authenticatedAndApproved") != null) {
View Full Code Here

        httpResp.sendRedirect(
            ((AuthSuccess) responseMessage).getDestinationUrl(true));
        return;
      }
      responseText.append("<pre>");
      responseText.append(responseMessage.keyValueFormEncoding());
      responseText.append("</pre>");
    }
    OutputStream os = httpResp.getOutputStream();
    os.write(responseText.toString().getBytes());
    os.close();
View Full Code Here

        String responseText;

        if ("associate".equals(mode)) {
            // --- process an association request ---
            response = manager.associationResponse(request);
            responseText = response.keyValueFormEncoding();
        } else if ("checkid_setup".equals(mode)
                || "checkid_immediate".equals(mode)) {
            // interact with the user and obtain data needed to continue
            List<?> userData = userInteraction(request,
                    manager.getOPEndpointUrl());
View Full Code Here

                // return null;
            }
        } else if ("check_authentication".equals(mode)) {
            // --- processing a verification request ---
            response = manager.verify(request);
            log.info("OpenID : " + response.keyValueFormEncoding());
            responseText = response.keyValueFormEncoding();
        } else if (Method.GET.equals(getMethod())) {
            // Could be a discovery request
            sendXRDSLocation();
            return new StringRepresentation("XRDS Discovery Information");
View Full Code Here

            }
        } else if ("check_authentication".equals(mode)) {
            // --- processing a verification request ---
            response = manager.verify(request);
            log.info("OpenID : " + response.keyValueFormEncoding());
            responseText = response.keyValueFormEncoding();
        } else if (Method.GET.equals(getMethod())) {
            // Could be a discovery request
            sendXRDSLocation();
            return new StringRepresentation("XRDS Discovery Information");
        } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.