Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current Restore this Version View Page History

« Previous Version 3 Next »

In integration test environments, it is often required to simulate authentication credentials. For example, a test client may need to supply credentials to authenticate with the secure service it tests. Fabric3 JUnit test components can be configured with authentication credentials, and those credentials propagated over a remote transport such as Web Services. The following shows how to simulate username/password credentials:

<component name="SecurityTest">
   <f3:junit class="...">
      <configuration>
         <username>scott</username>
         <password>wombat</password>
      </configuration>
   </f3:junit>
   <reference name="service" target="SCASecureService"/>
</component>

The Maven runtime is configured as follows:

<systemConfig>
   <!\[CDATA\[
      <config>
         <users>
            <user>
               <username>foo</username>
               <password>bar</password>
               <roles>
                  <role>role1</role>
                  <role>role2</role>
                </roles>
            </user>
         </users>
      </config>
   \]\]>
</systemConfig>

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.