Examples of GetAuthToken


Examples of org.uddi.api_v3.GetAuthToken

                        pass = clerk.getPassword();
                }
                if (username == null || pass==null) {
                   System.out.println("No credentials are available. This will probably fail spectacularly");
                } else {
                        GetAuthToken getAuthTokenRoot = new GetAuthToken();
                        getAuthTokenRoot.setUserID(username);
                        getAuthTokenRoot.setCred(pass);
                        token = security.getAuthToken(getAuthTokenRoot).getAuthInfo();
                }


                ExportTmodels();
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

        return null;
    }

    public static String GetAuthToken(String username, String password, UDDISecurityPortType sec) {
        try {
            GetAuthToken getAuthTokenRoot = new GetAuthToken();
            getAuthTokenRoot.setUserID(username);
            getAuthTokenRoot.setCred(password);
            return sec.getAuthToken(getAuthTokenRoot).getAuthInfo();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return null;
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

   *
   * @exception RegistryV3Exception;
   */
  public AuthToken getAuthToken(String userID, String cred)
      throws RegistryV3Exception {
    GetAuthToken request = this.objectFactory.createGetAuthToken();

    if (userID != null) {
      request.setUserID(userID);
    }

    if (cred != null) {
      request.setCred(cred);
    }

    URI getAuthTokenURI = null;
    if ("3.0".equals(uddiVersion)) {
      getAuthTokenURI = this.getSecurityURI();
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

  private void setupJoePublisher(UDDIClerk clerk) throws DispositionReportFaultMessage, RemoteException, ConfigurationException, TransportException {
   
    UDDISecurityPortType security = uddiClient.getTransport("default").getUDDISecurityService();
   
    //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();
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

     * @return
     */
    private String GetAuthKey(String username, String password, AuthStyle style) {
        try {

            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("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());
            return rootAuthToken.getAuthInfo();
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

     * @return
     */
    private String GetAuthKey(String username, String password, AuthStyle style) {
        try {

            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("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());
            return rootAuthToken.getAuthInfo();
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

      getUDDINode().getTransport().getUDDISecurityService(endpointURL).discardAuthToken(discardAuthToken);
      authToken=null;
    }
    if (authToken==null || "".equals(authToken)) {
      tokenBirthDate = new Date();
      GetAuthToken getAuthToken = new GetAuthToken();
      getAuthToken.setUserID(getPublisher());
      getAuthToken.setCred(getPassword());
      authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
    }
    return authToken;
  }
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

                        if (getPublisher()==null || getPassword()==null){
                                log.warn("No credentials provided for login!");
                                return null;
                        }
                        tokenBirthDate = new Date();
                        GetAuthToken getAuthToken = new GetAuthToken();
                        getAuthToken.setUserID(getPublisher());
                        if (isencrypted) {
                                if (cryptoProvider == null) {
                                        log.fatal("Credentials are encrypted but no cryptoProvider was defined in the config file!");
                                } else {
                                        try {
                                                getAuthToken.setCred(CryptorFactory.getCryptor(this.cryptoProvider).decrypt(getPassword()));
                                        } catch (Exception ex) {
                                                log.fatal("Unable to decrypt credentials! sending it as is", ex);
                                                getAuthToken.setCred(getPassword());
                                        }
                                }
                        } else {
                                log.warn("Hey, I couldn't help but notice that your credentials aren't encrypted. Please consider doing so");
                                getAuthToken.setCred(getPassword());
                        }
                        authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
                }
                return authToken;
        }
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

                logger.debug("Getting auth tokens..");
                try {
                        Transport transport = manager.getTransport();

                        security = transport.getUDDISecurityService();
                        GetAuthToken getAuthToken = new GetAuthToken();
                        getAuthToken.setUserID(TckPublisher.getRootPublisherId());
                        getAuthToken.setCred(TckPublisher.getRootPassword());
                        authInfo = security.getAuthToken(getAuthToken).getAuthInfo();

                        publisher = transport.getJUDDIApiService();
                } catch (Exception e) {
                        logger.error(e.getMessage(), e);
View Full Code Here

Examples of org.uddi.api_v3.GetAuthToken

                Assume.assumeTrue(TckPublisher.isUDDIAuthMode());
                try {
                        Transport transport = manager.getTransport();

                        UDDISecurityPortType securityService = transport.getUDDISecurityService();
                        GetAuthToken getAuthToken = new GetAuthToken();
                        getAuthToken.setUserID("root");
                        getAuthToken.setCred("");
                        AuthToken authToken = securityService.getAuthToken(getAuthToken);
                        logger.info("don't log auth tokens!!!");
                        Assert.assertNotNull(authToken);
                } catch (Exception e) {
                        logger.error(e);
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.