Package org.jboss.ws.metadata.wsse

Examples of org.jboss.ws.metadata.wsse.Username


      {
         operations.add(new OperationDescription<EncodingOperation>(TimestampOperation.class, null, null, timestamp.getTtl(), null));
      }

      NonceGenerator nonceGenerator = null;
      Username username = opConfig.getUsername();
      if (username != null)
      {
         Object user = ctx.get(Stub.USERNAME_PROPERTY);
         Object pass = ctx.get(Stub.PASSWORD_PROPERTY);

         if (user == null && pass == null)
         {
            user = ctx.get(BindingProvider.USERNAME_PROPERTY);
            pass = ctx.get(BindingProvider.PASSWORD_PROPERTY);
         }

         if (user != null && pass != null)
         {
            operations.add(new OperationDescription<EncodingOperation>(SendUsernameOperation.class, null, user.toString(), pass.toString(), null,username.isDigestPassword(), username.isUseNonce(), username.isUseCreated()));
            ctx.put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
         }

         NonceFactory factory = Util.loadFactory(NonceFactory.class, config.getNonceFactory(), DefaultNonceFactory.class);
         nonceGenerator = factory.getGenerator();
View Full Code Here


   {
      WSSecurityConfiguration configuration = WSSecurityOMFactory.newInstance().parse(new StringReader(clientConf));
      ByteArrayInputStream inputStream = new ByteArrayInputStream(testMessage.getBytes());
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      Username username = new Username(true, true, false);
      Config config = new Config();
      config.setUsername(username);
      sec.encodeMessage(configuration, soapMsg, config, "kermit", "therealfrog");
      Element securityEl = (Element)soapMsg.getSOAPHeader().getChildElements(Constants.WSSE_HEADER_QNAME).next();
      Element usernameTokenEl = (Element)DOMUtils.getChildElements(securityEl, new QName(Constants.WSSE_NS, "UsernameToken")).next();
View Full Code Here

   {
      WSSecurityConfiguration configuration = WSSecurityOMFactory.newInstance().parse(new StringReader(clientConf));
      ByteArrayInputStream inputStream = new ByteArrayInputStream(testMessage.getBytes());
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      Username username = new Username(true, false, true);
      Config config = new Config();
      config.setUsername(username);
      sec.encodeMessage(configuration, soapMsg, config, "kermit", "therealfrog");
      Element securityEl = (Element)soapMsg.getSOAPHeader().getChildElements(Constants.WSSE_HEADER_QNAME).next();
      Element usernameTokenEl = (Element)DOMUtils.getChildElements(securityEl, new QName(Constants.WSSE_NS, "UsernameToken")).next();
View Full Code Here

      if (timestamp != null)
      {
         operations.add(new TimestampOperation(timestamp.getTtl()));
      }

      Username username = config.getUsername();
      if (username != null && user != null && password != null)
      {
         NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);
         operations.add(new SendUsernameOperation(user, password, username.isDigestPassword(), username.isUseNonce(), username.isUseCreated(), factory.getGenerator()));
      }

      Sign sign = config.getSign();
      if (sign != null && (!fault || sign.isIncludeFaults()))
      {
View Full Code Here

   {
      WSSecurityConfiguration configuration = WSSecurityOMFactory.newInstance().parse(new StringReader(clientConf));
      ByteArrayInputStream inputStream = new ByteArrayInputStream(testMessage.getBytes());
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      Username username = new Username(true, true, false);
      Config config = new Config();
      config.setUsername(username);
      sec.encodeMessage(configuration, soapMsg, config, "kermit", "therealfrog");
      Element securityEl = (Element)soapMsg.getSOAPHeader().getChildElements(Constants.WSSE_HEADER_QNAME).next();
      Element usernameTokenEl = (Element)DOMUtils.getChildElements(securityEl, new QName(Constants.WSSE_NS, "UsernameToken")).next();
View Full Code Here

   {
      WSSecurityConfiguration configuration = WSSecurityOMFactory.newInstance().parse(new StringReader(clientConf));
      ByteArrayInputStream inputStream = new ByteArrayInputStream(testMessage.getBytes());
      MessageFactory factory = new MessageFactoryImpl();
      SOAPMessage soapMsg = factory.createMessage(null, inputStream);
      Username username = new Username(true, false, true);
      Config config = new Config();
      config.setUsername(username);
      sec.encodeMessage(configuration, soapMsg, config, "kermit", "therealfrog");
      Element securityEl = (Element)soapMsg.getSOAPHeader().getChildElements(Constants.WSSE_HEADER_QNAME).next();
      Element usernameTokenEl = (Element)DOMUtils.getChildElements(securityEl, new QName(Constants.WSSE_NS, "UsernameToken")).next();
View Full Code Here

      if (timestamp != null)
      {
         operations.add(new TimestampOperation(timestamp.getTtl()));
      }

      Username username = config.getUsername();
      if (username != null && user != null && password != null)
      {
         NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);
         operations.add(new SendUsernameOperation(user, password, username.isDigestPassword(), username.isUseNonce(), username.isUseCreated(), factory.getGenerator()));
      }

      Sign sign = config.getSign();
      if (sign != null)
      {
View Full Code Here

      if (timestamp != null)
      {
         operations.add(new TimestampOperation(timestamp.getTtl()));
      }

      Username username = config.getUsername();
      if (username != null && user != null && password != null)
      {
         NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);
         operations.add(new SendUsernameOperation(user, password, username.isDigestPassword(), username.isUseNonce(), username.isUseCreated(), factory.getGenerator()));
      }

      Sign sign = config.getSign();
      if (sign != null)
      {
View Full Code Here

      if (timestamp != null)
      {
         operations.add(new TimestampOperation(timestamp.getTtl()));
      }

      Username username = config.getUsername();
      if (username != null && user != null && password != null)
      {
         NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);
         operations.add(new SendUsernameOperation(user, password, username.isDigestPassword(), username.isUseNonce(), username.isUseCreated(), factory.getGenerator()));
      }

      Sign sign = config.getSign();
      if (sign != null)
      {
View Full Code Here

      if (timestamp != null)
      {
         operations.add(new TimestampOperation(timestamp.getTtl()));
      }

      Username username = config.getUsername();
      if (username != null && user != null && password != null)
      {
         NonceFactory factory = Util.loadFactory(NonceFactory.class, configuration.getNonceFactory(), DefaultNonceFactory.class);
         operations.add(new SendUsernameOperation(user, password, username.isDigestPassword(), username.isUseNonce(), username.isUseCreated(), factory.getGenerator()));
      }

      Sign sign = config.getSign();
      if (sign != null && (!fault || sign.isIncludeFaults()))
      {
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.wsse.Username

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.