Sriram,
The authentication feature is a new feature of Cactus 1.3. You can get
it by downloading the latest nightly build.
You'll then use it in the following manner :
/**
* Verify basic authentication.
*/
public void beginBasicAuthentication(WebRequest theRequest)
{
theRequest.setRedirectorName("ServletRedirectorSecure");
theRequest.setAuthentication(
new BasicAuthentication("testuser", "testpwd"));
}
/**
* Verify basic authentication.
*/
public void testBasicAuthentication()
{
assertEquals("testuser", request.getUserPrincipal().getName());
assertEquals("testuser", request.getRemoteUser());
assert("User not in 'test' role", request.isUserInRole("test"));
}
-Vincent
> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
> On Behalf Of Sriram Chavali
> Sent: 24 January 2002 17:21
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Cactus servlet under Websphere 4.0
>
> I am trying to run a TestServlet for a servlet deployed in Websphere
4.0
> with security turned on. When the servlet is invoked, the remote user
is
> set as null. How do I specify the 'remote user' and password ? I
looked
> up the api for ServletTestRequest, but found nothing there for setting
> up a 'remote user'. Are there start-up options that I need to specify
to
> the TestServlet ?
>
> Please help,
> Sriram
>
>
> --
> To unsubscribe, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>