Package org.openid4java.message

Examples of org.openid4java.message.ParameterList


            logger.debug("authentication cancelled");
            return null;
        }

        // parameters list returned by the provider
        final ParameterList parameterList = new ParameterList(context.getRequestParameters());

        // retrieve the previously stored discovery information
        final DiscoveryInformation discoveryInformation = (DiscoveryInformation) context
                .getSessionAttribute(getDiscoveryInformationSessionAttributeName());
View Full Code Here


     */
    protected abstract U createProfile(AuthSuccess authSuccess) throws MessageException;

    @Override
    protected U retrieveUserProfile(final OpenIdCredentials credentials, final WebContext context) {
        final ParameterList parameterList = credentials.getParameterList();
        final DiscoveryInformation discoveryInformation = credentials.getDiscoveryInformation();
        logger.debug("parameterList : {}", parameterList);
        logger.debug("discoveryInformation : {}", discoveryInformation);

        try {
View Full Code Here

        if (false == "200".equals(response.getStatus())) {
            throw new RuntimeException("invalid status return code: " + response.getStatus());
        }

        byte[] responseContent = response.getContent();
        ParameterList responseParameterList = ParameterList.createFromKeyValueForm(new String(responseContent));
        AssociationResponse associationResponse = AssociationResponse.createAssociationResponse(responseParameterList);

        Association association = associationResponse.getAssociation(dhSession);
        return association;
    }
View Full Code Here

    System.out.println("verifying");
    try {

      // extract the parameters from the authentication response
      // (which comes in as a HTTP request from the OpenID provider)
      ParameterList responseParams = new ParameterList(request.getParameterMap());
      System.out.println("extract receiving url");
      // extract the receiving URL from the HTTP request
      StringBuffer receivingURL = request.getRequestURL();
      String queryString = request.getQueryString();
      if (queryString != null && queryString.length() > 0)
View Full Code Here

    @SuppressWarnings("unchecked")
    public OpenIDAuthenticationToken endConsumption(HttpServletRequest request) throws OpenIDConsumerException {
        final boolean debug = logger.isDebugEnabled();
        // extract the parameters from the authentication response
        // (which comes in as a HTTP request from the OpenID provider)
        ParameterList openidResp = new ParameterList(request.getParameterMap());

        // retrieve the previously stored discovery information
        DiscoveryInformation discovered = (DiscoveryInformation) request.getSession().getAttribute(DISCOVERY_INFO_KEY);

        // extract the receiving URL from the HTTP request
View Full Code Here

    }
    log.debug("Receiving URL = '{}", receivingURL.toString());

    // Extract the parameters from the authentication response
    // (which comes in as a HTTP request from the OpenID provider)
    ParameterList parameterList = new ParameterList(request.getParameterMap());

    try {

      // Verify the response
      // ConsumerManager needs to be the same (static) instance used
View Full Code Here

    // --- processing the authentication response ---
    public Identifier verifyResponse(HttpServletRequest httpReq) {
        try {
            // extract the parameters from the authentication response
            // (which comes in as a HTTP request from the OpenID provider)
            ParameterList response =
                    new ParameterList(httpReq.getParameterMap());

            // retrieve the previously stored discovery information
            DiscoveryInformation discovered = (DiscoveryInformation)
                    httpReq.getSession().getAttribute("openid-disc");
View Full Code Here

      manager.setPrivateAssociations(new InMemoryServerAssociationStore());
      manager.setOPEndpointUrl(request.getScheme() + "://"
            + request.getServerName() + ":"
            + request.getServerPort() + "/simple-openid/provider.jsp");
     
      ParameterList requestp;

      if ("complete".equals(request.getParameter("_action"))) // Completing the authz and authn process by redirecting here
      {
          requestp=(ParameterList) session.getAttribute("parameterlist"); // On a redirect from the OP authn & authz sequence
      }
      else
      {
          requestp = new ParameterList(request.getParameterMap());
      }

      String mode = requestp.hasParameter("openid.mode") ?
                  requestp.getParameterValue("openid.mode") : null;

          Message responsem;
          String responseText;

          if ("associate".equals(mode))
View Full Code Here

      manager.setPrivateAssociations(new InMemoryServerAssociationStore());
      manager.setOPEndpointUrl(request.getScheme() + "://"
            + request.getServerName() + ":"
            + request.getServerPort() + "/simple-openid/provider.jsp");
     
      ParameterList requestp;

      if ("complete".equals(request.getParameter("_action"))) // Completing the authz and authn process by redirecting here
      {
          requestp=(ParameterList) session.getAttribute("parameterlist"); // On a redirect from the OP authn & authz sequence
      }
      else
      {
          requestp = new ParameterList(request.getParameterMap());
      }

      String mode = requestp.hasParameter("openid.mode") ?
                  requestp.getParameterValue("openid.mode") : null;

          Message responsem;
          String responseText;

          if ("associate".equals(mode))
View Full Code Here

            IOException {
        try {
            HttpSession httpSession = httpRequest.getSession(false);
            ConsumerManager manager = (ConsumerManager) httpSession.getAttribute("manager");

            ParameterList openidResp = new ParameterList(httpRequest.getParameterMap());
            List list = openidResp.getParameters();
            if (list != null){
                for (Object param : list) {
                    if (param != null && ((Parameter)param).getKey() != null && ((Parameter)param).getValue() != null){
                        log.info(((Parameter) param).getKey() + "=" + ((Parameter) param).getValue());
                    }
View Full Code Here

TOP

Related Classes of org.openid4java.message.ParameterList

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.