Package org.jboss.ws.extensions.security.element

Examples of org.jboss.ws.extensions.security.element.UsernameToken


      secAdapterfactory = spiProvider.getSPI(SecurityAdaptorFactory.class);
   }

   public void process(Document message, Token token) throws WSSecurityException
   {
      UsernameToken user = (UsernameToken)token;
      SecurityAdaptor securityAdaptor = secAdapterfactory.newSecurityAdapter();

      securityAdaptor.setPrincipal(new SimplePrincipal(user.getUsername()));
      securityAdaptor.setCredential(user.getPassword());
   }
View Full Code Here


      secAdapterfactory = spiProvider.getSPI(SecurityAdaptorFactory.class);
   }

   public void process(Document message, Token token) throws WSSecurityException
   {
      UsernameToken user = (UsernameToken)token;
      SecurityAdaptor securityAdaptor = secAdapterfactory.newSecurityAdapter();
      Logger.getLogger(this.getClass()).info("Username: " + user.getUsername());
      Logger.getLogger(this.getClass()).info("Password: " + user.getPassword());
      if (user.isDigest())
      {
         verifyUsernameToken(user);
         CallbackHandler handler = new UsernameTokenCallbackHandler(user.getNonce(), user.getCreated());
         CallbackHandlerPolicyContextHandler.setCallbackHandler(handler);
      }
      securityAdaptor.setPrincipal(new SimplePrincipal(user.getUsername()));
      securityAdaptor.setCredential(user.getPassword());
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.security.element.UsernameToken

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.