jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Cactus servlet under Websphere 4.0
Date Thu, 24 Jan 2002 18:16:23 GMT
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: eisriram@mailhub-cvg.sdrc.com
[mailto:eisriram@mailhub-cvg.sdrc.com]
> On Behalf Of Sriram Chavali
> Sent: 24 January 2002 17:21
> To: cactus-user@jakarta.apache.org; actus-user@jakarta.apache.org
> 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-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message