Package org.openid4java.message.ax

Examples of org.openid4java.message.ax.FetchRequest


            // obtain a AuthRequest message to be sent to the OpenID provider
            AuthRequest authReq = manager.authenticate(discovered, returnToUrl);

            // Attribute Exchange example: fetching the 'email' attribute
            FetchRequest fetch = FetchRequest.createFetchRequest();
            fetch.addAttribute("email",
                    // attribute alias
                    "http://schema.openid.net/contact/email",   // type URI
                    true);                                      // required

            // attach the extension to the authentication request
View Full Code Here


      AuthRequest auth = consumerManager.authenticate(discoveryInformation, OpenIdSession.get()
          .getOpenIdReturnUrl());

      if (discoveryInformation.getTypes().contains(AxMessage.OPENID_NS_AX)) {
        FetchRequest fetch = FetchRequest.createFetchRequest();
        fetch.addAttribute("email", "http://axschema.org/contact/email", true);
        fetch.addAttribute("fullname", "http://axschema.org/namePerson", false);
        fetch.addAttribute("firstname", "http://axschema.org/namePerson/first", false);
        fetch.addAttribute("lastname", "http://axschema.org/namePerson/last", false);
        auth.addExtension(fetch);
      } else if (discoveryInformation.getTypes().contains(SRegMessage.OPENID_NS_SREG)) {
        SRegRequest sregReq = SRegRequest.createFetchRequest();

        sregReq.addAttribute("fullname", true);
View Full Code Here

      // obtain a AuthRequest message to be sent to the OpenID provider
      AuthRequest authReq = manager.authenticate(discovered, returnToUrl);

      // Attribute Exchange example: fetching the 'email' attribute
      FetchRequest fetch = FetchRequest.createFetchRequest();

      // Using axschema
      fetch.addAttribute("emailax", "http://axschema.org/contact/email",
          true);

      fetch.addAttribute("firstnameax",
          "http://axschema.org/namePerson/first", true);

      fetch.addAttribute("lastnameax",
          "http://axschema.org/namePerson/last", true);

      fetch.addAttribute("fullnameax", "http://axschema.org/namePerson",
          true);

      fetch.addAttribute("email",
          "http://schema.openid.net/contact/email", true);

      // Using schema.openid.net (for compatibility)
      fetch.addAttribute("firstname",
          "http://schema.openid.net/namePerson/first", true);

      fetch.addAttribute("lastname",
          "http://schema.openid.net/namePerson/last", true);

      fetch.addAttribute("fullname",
          "http://schema.openid.net/namePerson", true);

      // attach the extension to the authentication request
      authReq.addExtension(fetch);
View Full Code Here

      AuthRequest auth = consumerManager.authenticate(discoveryInformation, OpenIdSession.get()
          .getOpenIdReturnUrl());

      if (discoveryInformation.getTypes().contains(AxMessage.OPENID_NS_AX)) {
        FetchRequest fetch = FetchRequest.createFetchRequest();
        fetch.addAttribute("email", "http://axschema.org/contact/email", true);
        fetch.addAttribute("fullname", "http://axschema.org/namePerson", false);
        fetch.addAttribute("firstname", "http://axschema.org/namePerson/first", false);
        fetch.addAttribute("lastname", "http://axschema.org/namePerson/last", false);
        auth.addExtension(fetch);
      } else if (discoveryInformation.getTypes().contains(SRegMessage.OPENID_NS_SREG)) {
        SRegRequest sregReq = SRegRequest.createFetchRequest();

        sregReq.addAttribute("fullname", true);
View Full Code Here

                    try
                    {
                        // authentication request
                        AuthRequest authRequest = providerOpenIDConsumerManager.authenticate(discovered, authReturnToURL, openIDRealmURL);
                        // request attribute exchange data
                        FetchRequest axRequest = FetchRequest.createFetchRequest();
                        axRequest.addAttribute("email", "http://axschema.org/contact/email", true);
                        axRequest.addAttribute("fullname", "http://axschema.org/namePerson", true);
                        axRequest.addAttribute("lastname", "http://axschema.org/namePerson/last", true);
                        axRequest.addAttribute("firstname", "http://axschema.org/namePerson/first", true);
                        axRequest.addAttribute("nickname", "http://axschema.org/namePerson/friendly", true);
                        authRequest.addExtension(axRequest);
                        // request simple registration data
                        SRegRequest sregRequest = SRegRequest.createFetchRequest();
                        sregRequest.addAttribute("email", true);
                        sregRequest.addAttribute("fullname", true);
View Full Code Here

      // obtain a AuthRequest message to be sent to the OpenID provider
      AuthRequest authReq = manager.authenticate(discovered, returnToUrl);

      // Attribute Exchange example: fetching the 'email' attribute
      FetchRequest fetch = FetchRequest.createFetchRequest();
      fetch.addAttribute("email", // attribute alias
              "http://schema.openid.net/contact/email", // type URI
              true); // required
      // attach the extension to the authentication request
      authReq.addExtension(fetch);
View Full Code Here

TOP

Related Classes of org.openid4java.message.ax.FetchRequest

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.