Package org.netbeans.server.uihandler.api

Examples of org.netbeans.server.uihandler.api.Authenticator$AuthToken


        if (AuthTokenV3Singleton.getToken(username) != null) {
          return (AuthToken) AuthTokenV3Singleton.getToken(username);
        }
       
       
        AuthToken token = null;
        try {
            token = ireg.getAuthToken(username, pwd);
        }
        catch (Exception e)
        {
View Full Code Here


      getAuthTokenURI = this.getSecurityURI();
    } else {
      getAuthTokenURI = this.getPublishURI();
    }
   
        AuthToken at = null;
        JAXBElement<?> o = execute(this.objectFactory.createGetAuthToken(request),
            getAuthTokenURI);
        if (o!=null)
        at = (AuthToken) o.getValue();
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

            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();
        } catch (Exception ex) {
            System.out.println("Could not authenticate with the provided credentials " + ex.getMessage());
        }
        return null;
    }
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("root AUTHTOKEN = " + rootAuthToken.getAuthInfo());
            return rootAuthToken.getAuthInfo();
        } catch (Exception ex) {
            System.out.println("Could not authenticate with the provided credentials " + ex.getMessage());
        }
        return null;
    }
View Full Code Here

      Marshaller marshaller = jaxbContext.createMarshaller();
      marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
      marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
      marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
      ObjectFactory factory = new ObjectFactory();
      AuthToken authToken = factory.createAuthToken();
      authToken.setAuthInfo("AuthInfo String");
      StringWriter writer = new StringWriter();
      JAXBElement<AuthToken> element = new JAXBElement<AuthToken>(new QName("","fragment"),AuthToken.class,authToken);
      marshaller.marshal(element,writer);
      String actualXml=writer.toString();
     
View Full Code Here

      Marshaller marshaller = jaxbContext.createMarshaller();
      marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
      marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
      marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
      ObjectFactory factory = new ObjectFactory();
      AuthToken authToken = factory.createAuthToken();
      authToken.setAuthInfo(UTF8_WORD);
      StringWriter writer = new StringWriter();
      JAXBElement<AuthToken> element = new JAXBElement<AuthToken>(new QName("","fragment"),AuthToken.class,authToken);
      marshaller.marshal(element,writer);
      String actualXml=writer.toString();
View Full Code Here

                        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);
                        Assert.fail();
View Full Code Here

         Transport transport = manager.getTransport();
           UDDISecurityPortType securityService = transport.getUDDISecurityService();
           GetAuthToken getAuthToken = new GetAuthToken();
           getAuthToken.setUserID(TckPublisher.getRootPublisherId());
           getAuthToken.setCred(TckPublisher.getRootPassword());
           AuthToken authToken = securityService.getAuthToken(getAuthToken);
           System.out.println("Don't log auth tokens!");
           Assert.assertNotNull(authToken);
       } catch (Exception e) {
           e.printStackTrace();
           Assert.fail();
View Full Code Here

                authToken.setGeneric(MapUDDIv3Tov2.VERSION);
                authToken.setCred(body.getCred());
                authToken.setUserID(body.getUserID());
                try {
                        org.uddi.api_v2.AuthToken authToken1 = publishService.getAuthToken(authToken);
                        AuthToken r = new AuthToken();
                        r.setAuthInfo(authToken1.getAuthInfo());
                        return r;
                } catch (DispositionReport ex) {
                        throw MapUDDIv2Tov3.MapException(ex);
                catch (SOAPFaultException ex) {
                        throw MapUDDIv2Tov3.MapException(ex);
View Full Code Here

TOP

Related Classes of org.netbeans.server.uihandler.api.Authenticator$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.