Package org.openid4java.message

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


            authResponse = openIdServerManager.get().authResponse(parameterList, opLocalIdentifier, claimedIdentifier, authenticationSuccesful, false);
           
            if (openIdProviderRequest.get().getRequestedAttributes() != null) {
                try {
                    FetchResponse fetchResponse = FetchResponse.createFetchResponse(openIdProviderRequest.get().getFetchRequest(), attributeValues);
                    authResponse.addExtension(fetchResponse);
                } catch (MessageException e) {
                    throw new RuntimeException(e);
                }
            }
           
View Full Code Here


         if (openIdProviderRequest.get().getRequestedAttributes() != null)
         {
            try
            {
               FetchResponse fetchResponse = FetchResponse.createFetchResponse(openIdProviderRequest.get().getFetchRequest(), attributeValues);
               authResponse.addExtension(fetchResponse);
            }
            catch (MessageException e)
            {
               throw new RuntimeException(e);
            }
View Full Code Here

          String country = (String) session.getAttribute("country");
          if (country != null) {
            fetchResponse.addAttribute(Step2.AxSchema.COUNTRY.getShortName(),
                Step2.AxSchema.COUNTRY.getUri(), country);
          }
          responseMessage.addExtension(fetchResponse);
        } catch (MessageException e) {
          throw new ServletException(e);
        }

        // Handle any OAuth Request tokens
View Full Code Here

        if (oauthRequestToken != null) {
          // This is a request token response
          HybridOauthResponse hybridResponse =
              new HybridOauthResponse(oauthRequestToken, "");
          try {
            responseMessage.addExtension(hybridResponse);
          } catch (MessageException e) {
            throw new ServletException(e);
          }
        }
View Full Code Here

                    Map userDataExt = new HashMap();
                    userDataExt.put("email", "someone@someplace.com");
                    FetchResponse fetchResp = FetchResponse.createFetchResponse(fetchReq, userDataExt);
                    // (alternatively) manually add attribute values
                    //fetchResp.addAttribute("email", "http://schema.openid.net/contact/email", email);
                    messageResponse.addExtension(fetchResp);
                }
            }
            else //if (ext instanceof StoreRequest)
            {
                throw new UnsupportedOperationException("TODO");
View Full Code Here

                    userDataSReg.put("email", "user@example.com");

                    SRegResponse sregResp = SRegResponse.createSRegResponse(sregReq, userDataSReg);
                    // (alternatively) manually add attribute values
                    //sregResp.addAttribute("email", email);
                    messageResponse.addExtension(sregResp);
                }
            }
            else
            {
                throw new UnsupportedOperationException("TODO");
View Full Code Here

                            FetchResponse fetchResp =
                                FetchResponse.createFetchResponse(fetchReq, userDataExt);
                            // (alternatively) manually add attribute values
                            fetchResp.addAttribute("email",
                                "http://schema.openid.net/contact/email", email);
                            response.addExtension(fetchResp);
                        }
                    }
                    else //if (ext instanceof StoreRequest)
                    {
                        throw new UnsupportedOperationException("TODO");
View Full Code Here

                            //userData.put("email", "user@example.com");

                            SRegResponse sregResp = SRegResponse.createSRegResponse(sregReq, userDataSReg);
                            // (alternatively) manually add attribute values
                            sregResp.addAttribute("email", email);
                            response.addExtension(sregResp);
                        }
                    }
                    else
                    {
                        throw new UnsupportedOperationException("TODO");
View Full Code Here

              //userDataExt.put("email", userData.get(3));

              FetchResponse fetchResp = FetchResponse.createFetchResponse(fetchReq, userDataExt);
              // (alternatively) manually add attribute values
              fetchResp.addAttribute("email", "http://schema.openid.net/contact/email", email);
              response.addExtension(fetchResp);
            }
          } else {
            throw new UnsupportedOperationException("TODO");
          }
        }
View Full Code Here

              //userData.put("email", "user@example.com");

              SRegResponse sregResp = SRegResponse.createSRegResponse(sregReq, userDataSReg);
              // (alternatively) manually add attribute values
              sregResp.addAttribute("email", email);
              response.addExtension(sregResp);
            }
          } else {
            throw new UnsupportedOperationException("TODO");
          }
        }
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.