Package org.uddi.api_v3

Examples of org.uddi.api_v3.GetAuthToken


    }
  }
 
  private String getAuthToken(String endpointURL) throws TransportException, DispositionReportFaultMessage, RemoteException {
    if (authToken==null) {
      GetAuthToken getAuthToken = new GetAuthToken();
      getAuthToken.setUserID(getPublisher());
      getAuthToken.setCred(getPassword());
      authToken = getUDDINode().getTransport().getUDDISecurityService(endpointURL).getAuthToken(getAuthToken).getAuthInfo();
    }
    return authToken;
  }
View Full Code Here


    InstantiationException, IllegalAccessException, TransportException, DispositionReportFaultMessage, RemoteException,
    IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException {
   
        Transport transport = WebHelper.getTransport(servletContext);
    UDDISecurityPortType securityService = transport.getUDDISecurityService();
    GetAuthToken getAuthToken = new GetAuthToken();
    getAuthToken.setUserID(username);
    getAuthToken.setCred(password);
    AuthToken authToken = securityService.getAuthToken(getAuthToken);
    log.info("User " + username + " obtained token from node=" + WebHelper.getUDDIHomeNode(servletContext).getName());
    return authToken;
  }
View Full Code Here

  @Override
  protected void execute() throws Exception {

    if (authenticationToken == null)
    {
      GetAuthToken getAuthToken = new GetAuthToken();
      getAuthToken.setUserID("root");
      getAuthToken.setCred("root");
 
      authenticationToken = securityService.getAuthToken(getAuthToken);
    }
   
  }
View Full Code Here

   * are requesting an AuthToken for user "root".
   */
  @Override
  protected void execute() throws Exception {

    GetAuthToken getAuthToken = new GetAuthToken();
    getAuthToken.setUserID("root");
    getAuthToken.setCred("root");

    authenticationToken = securityService.getAuthToken(getAuthToken);
   
  }
View Full Code Here

                        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

        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

   *
   * @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

  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

     * @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

     * @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

TOP

Related Classes of org.uddi.api_v3.GetAuthToken

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.