Package org.openid4java.message

Examples of org.openid4java.message.AuthRequest.addExtension()


        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);
        sregReq.addAttribute("email", true);
View Full Code Here


        SRegRequest sregReq = SRegRequest.createFetchRequest();

        sregReq.addAttribute("fullname", true);
        sregReq.addAttribute("email", true);

        auth.addExtension(sregReq);
      }

      return auth;
    } catch (MessageException e) {
      throw new WicketRuntimeException("failed to create OpenID AuthRequest", e);
View Full Code Here

                        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);
                        sregRequest.addAttribute("nickname", true);
View Full Code Here

                        // request simple registration data
                        SRegRequest sregRequest = SRegRequest.createFetchRequest();
                        sregRequest.addAttribute("email", true);
                        sregRequest.addAttribute("fullname", true);
                        sregRequest.addAttribute("nickname", true);
                        authRequest.addExtension(sregRequest);
                        // authentication redirect
                        authRedirectURL = authRequest.getDestinationUrl(true);
                    }
                    catch (OpenIDException oide)
                    {
View Full Code Here

      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);

      // example using Simple Registration to fetching the 'email' attribute
      SRegRequest sregReq = SRegRequest.createFetchRequest();
      sregReq.addAttribute("email", true);
      authReq.addExtension(sregReq);
View Full Code Here

      authReq.addExtension(fetch);

      // example using Simple Registration to fetching the 'email' attribute
      SRegRequest sregReq = SRegRequest.createFetchRequest();
      sregReq.addAttribute("email", true);
      authReq.addExtension(sregReq);

      // if (!discovered.isVersion2()) {
      // Option 1: GET HTTP-redirect to the OpenID Provider endpoint
      // The only method supported in OpenID 1.x
      // redirect-URL usually limited ~2048 bytes
View Full Code Here

    return info;
  }
 
  private AuthRequest createMockAuthRequest() throws MessageException {
    AuthRequest authRequest = createMock(AuthRequest.class);
    authRequest.addExtension(anyObject(FetchRequest.class));
    authRequest.addExtension(anyObject(SRegRequest.class));
    expect(authRequest.getDestinationUrl(true)).andReturn("http://example.com/redirect");
    replay(authRequest);
    return authRequest;
  }
View Full Code Here

  }
 
  private AuthRequest createMockAuthRequest() throws MessageException {
    AuthRequest authRequest = createMock(AuthRequest.class);
    authRequest.addExtension(anyObject(FetchRequest.class));
    authRequest.addExtension(anyObject(SRegRequest.class));
    expect(authRequest.getDestinationUrl(true)).andReturn("http://example.com/redirect");
    replay(authRequest);
    return authRequest;
  }
 
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.