Package org.jboss.ws.metadata.wsse

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


    * Test loading a configuration with a default 'authorize' definition
    * which contains one role.
    */
   public void testDefaultRole() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role.xml");

      Config config = wsConfig.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertFalse("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

      assertEquals("Expected 1 roles", 1, roles.size());
View Full Code Here


    * Test loading a configuration with a port 'authorize' definition
    * which contains one role.
    */
   public void testPortRole() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role.xml");

      Port port = wsConfig.getPorts().get("TestPort");
      Config config = port.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertFalse("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

View Full Code Here

    * Test loading a configuration with a default 'authorize' definition
    * with unchecked.
    */
   public void testDefaultUnchecked() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-default-unchecked.xml");

      Config config = wsConfig.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertTrue("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

      assertEquals("Expected 0 roles", 0, roles.size());
View Full Code Here

    * Test loading a configuration with a port 'authorize' definition
    * with unchecked.
    */
   public void testPortUnchecked() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-port-unchecked.xml");

      Port port = wsConfig.getPorts().get("TestPort");
      Config config = port.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertTrue("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

View Full Code Here

    */
   public void testDefaultRoleUnchecked() throws Exception
   {
      try
      {
         WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role-unchecked.xml");
         fail("Expected exception not thrown.");
      }
      catch (IOException expected)
      {
         Throwable cause = expected.getCause();
View Full Code Here

    */
   public void testPortRoleUnchecked() throws Exception
   {
      try
      {
         WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role-unchecked.xml");
         fail("Expected exception not thrown.");
      }
      catch (IOException expected)
      {
         Throwable cause = expected.getCause();
View Full Code Here

    * Test loading a configuration with a default 'authorize' definition
    * which contains two roles.
    */
   public void testDefaultRoles() throws Exception
   {
      WSSecurityConfiguration wsConfig = load("jboss-wsse-default-roles.xml");

      Config config = wsConfig.getDefaultConfig();
      Authorize authorize = config.getAuthorize();
      assertFalse("Unchecked", authorize.isUnchecked());
      List<Role> roles = authorize.getRoles();

      assertEquals("Expected 2 roles", 2, roles.size());
View Full Code Here

   protected boolean handleInboundSecurity(MessageContext msgContext)
   {
      try
      {
         WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
         if (configuration != null)
         {
            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
            new WSSecurityDispatcher().decodeMessage(configuration, soapMessage, null);
View Full Code Here

   protected boolean handleOutboundSecurity(MessageContext msgContext)
   {
      try
      {
         WSSecurityConfiguration configuration = getSecurityConfiguration(msgContext);
         if (configuration != null)
         {
            CommonMessageContext ctx = (CommonMessageContext)msgContext;
            SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
           
View Full Code Here

      ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();

      if(serviceMetaData.getSecurityConfiguration() == null) // might be set through ServiceObjectFactory
      {
         UnifiedVirtualFile vfsRoot = serviceMetaData.getUnifiedMetaData().getRootFile();
         WSSecurityConfiguration config = null;
         try
         {
            WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
            config = wsseConfFactory.createConfiguration(vfsRoot, getConfigResourceName());
         }
View Full Code Here

TOP

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

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.