Package org.uddi.api_v3

Examples of org.uddi.api_v3.AuthToken


    //login as root so we can create joe publisher
    GetAuthToken getAuthTokenRoot = new GetAuthToken();
    getAuthTokenRoot.setUserID("root");
    getAuthTokenRoot.setCred("");
    // Making API call that retrieves the authentication token for the 'root' user.
    AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
    System.out.println("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());
    //Creating joe publisher THIS IS JUDDI Specific code
    JUDDIApiPortType juddiApi = uddiClient.getTransport("default").getJUDDIApiService();
    Publisher p = new Publisher();
    p.setAuthorizedName("joepublisher");
    p.setPublisherName("Joe Publisher");
    // Adding the publisher to the "save" structure, using the 'root' user authentication info and saving away.
    SavePublisher sp = new SavePublisher();
    sp.getPublisher().add(p);
    sp.setAuthInfo(rootAuthToken.getAuthInfo());
    juddiApi.savePublisher(sp);
    //END jUDDI specific code
               
    //Every publisher should have a keyGenerator, Joe has his:
    TModel keyGenerator = new TModel();
View Full Code Here


                        GetAuthToken getAuthTokenRoot = new GetAuthToken();
                        getAuthTokenRoot.setUserID("uddi");
                        getAuthTokenRoot.setCred("uddi");

                        // Making API call that retrieves the authentication token for the 'root' user.
                        AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
                        token = rootAuthToken.getAuthInfo();
                }

                //step two, identify the key used for all your stuff
                //you must have a key generator created already
                //here, we are assuming that you don't have one
View Full Code Here

                        if (session.getAttribute("username") != null
                                && session.getAttribute("password") != null) {
                                req.setUserID((String) session.getAttribute("username"));
                                req.setCred(AES.Decrypt((String) session.getAttribute("password"), (String) properties.get("key")));
                                try {
                                        AuthToken authToken = security.getAuthToken(req);
                                        token = authToken.getAuthInfo();
                                } catch (Exception ex) {
                                        return HandleException(ex);
                                }
                        }
                }
View Full Code Here

                                && session.getAttribute("password") != null) {
                                req.setUserID((String) session.getAttribute("username"));
                                req.setCred(AES.Decrypt((String) session.getAttribute("password"), (String) properties.get("key")));
                                log.info("AUDIT: fetching auth token for " + req.getUserID() + " Auth Mode is " + ((security == null) ? "HTTP" : "AUTH_TOKEN"));
                                try {
                                        AuthToken authToken = security.getAuthToken(req);
                                        token = authToken.getAuthInfo();
                                        return null;
                                } catch (Exception ex) {
                                        return HandleException(ex);
                                }
                        }
View Full Code Here

        //step one, get a token
        GetAuthToken getAuthTokenRoot = new GetAuthToken();
        getAuthTokenRoot.setUserID("uddi");

        getAuthTokenRoot.setCred("uddi");
        AuthToken authToken = security.getAuthToken(getAuthTokenRoot);
        TModel createKeyGenator = UDDIClerk.createKeyGenator("uddi:testdomain:keygenerator", "a name", "en");

        TModel createKeyGenator2 = UDDIClerk.createKeyGenator("uddi:testdomain2:keygenerator", "a name", "en");

        SaveTModel st = new SaveTModel();
        st.setAuthInfo(authToken.getAuthInfo());
        st.getTModel().add(createKeyGenator);
        st.getTModel().add(createKeyGenator2);
        publish.saveTModel(st);

        SaveBusiness sb = new SaveBusiness();
        sb.setAuthInfo(authToken.getAuthInfo());
        BusinessEntity be = new BusinessEntity();
        be.setBusinessKey("uddi:testdomain:biz1");
        be.getName().add(new Name("test", "en"));
        be.setBusinessServices(new BusinessServices());
        BusinessService bs = new BusinessService();
View Full Code Here

                                        GetAuthToken getAuthTokenRoot = new GetAuthToken();
                                        getAuthTokenRoot.setUserID(username);
                                        getAuthTokenRoot.setCred(password);

                                        // Making API call that retrieves the authentication token for the 'root' user.
                                        AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
                                        System.out.println(username + " AUTHTOKEN = (don't log auth tokens!)");
                                        return rootAuthToken.getAuthInfo();
                                } catch (Exception ex) {
                                        System.out.println("Could not authenticate with the provided credentials " + ex.getMessage());
                                }
                }
View Full Code Here

                        GetAuthToken getAuthTokenRoot = new GetAuthToken();
                        getAuthTokenRoot.setUserID("uddi");
                        getAuthTokenRoot.setCred("uddi");

                        // Making API call that retrieves the authentication token for the 'root' user.
                        AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
                        token = rootAuthToken.getAuthInfo();
                }

                //step two, identify the key used for all your stuff
                //you must have a key generator created already
                //here, we are assuming that you don't have one
View Full Code Here

                        GetAuthToken getAuthTokenRoot = new GetAuthToken();
                        getAuthTokenRoot.setUserID(username);
                        getAuthTokenRoot.setCred(password);

                        // Making API call that retrieves the authentication token for the user.
                        AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
                        System.out.println(username + " AUTHTOKEN = (don't log auth tokens!");
                        return rootAuthToken.getAuthInfo();
                } catch (Exception ex) {
                        System.out.println("Could not authenticate with the provided credentials " + ex.getMessage());
                }
                return null;
        }
View Full Code Here

    //login as root so we can create joe publisher
    GetAuthToken getAuthTokenRoot = new GetAuthToken();
    getAuthTokenRoot.setUserID("root");
    getAuthTokenRoot.setCred("");
    // Making API call that retrieves the authentication token for the 'root' user.
    AuthToken rootAuthToken = security.getAuthToken(getAuthTokenRoot);
    System.out.println ("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());
    //Creating joe publisher
    JUDDIApiPortType juddiApi = uddiClient.getTransport("default").getJUDDIApiService();
    Publisher p = new Publisher();
    p.setAuthorizedName("joepublisher");
    p.setPublisherName("Joe Publisher");
    // Adding the publisher to the "save" structure, using the 'root' user authentication info and saving away.
    SavePublisher sp = new SavePublisher();
    sp.getPublisher().add(p);
    sp.setAuthInfo(rootAuthToken.getAuthInfo());
    juddiApi.savePublisher(sp);
   
    //Joe should have a keyGenerator
    TModel keyGenerator = new TModel();
    keyGenerator.setTModelKey("uddi:uddi.joepublisher.com:keygenerator");
View Full Code Here

    }
  }
  public void findBinding() {
    try {
      FindBinding body = (FindBinding)EntityCreator.buildFromDoc(FIND_BINDING_XML, "org.uddi.api_v3");
      BindingDetail result = inquiry.findBinding(body);
      if (result == null)
        Assert.fail("Null result from find binding operation");
      List<BindingTemplate> btList = result.getBindingTemplate();
      if (btList == null || btList.size() == 0)
        Assert.fail("No result from find binding operation");
      BindingTemplate btOut = btList.get(0);
     
      BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(TckBindingTemplate.JOE_BINDING_XML, "org.uddi.api_v3");
View Full Code Here

TOP

Related Classes of org.uddi.api_v3.AuthToken

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.