org.mortbay.http

Class ClientCertAuthenticator

Implemented Interfaces:
Authenticator, Serializable

public class ClientCertAuthenticator
extends java.lang.Object
implements Authenticator

Client Certificate Authenticator. This Authenticator uses a client certificate to authenticate the user. Each client certificate supplied is tried against the realm using the Principal name as the username and a string representation of the certificate as the credential.
Version:
$Id: ClientCertAuthenticator.java,v 1.14 2005/08/13 00:01:24 gregwilkins Exp $
Author:
Greg Wilkins (gregw)

Constructor Summary

ClientCertAuthenticator()

Method Summary

Principal
authenticate(UserRealm realm, String pathInContext, HttpRequest request, HttpResponse response)
String
getAuthMethod()
int
getMaxHandShakeSeconds()
void
setMaxHandShakeSeconds(int maxHandShakeSeconds)

Constructor Details

ClientCertAuthenticator

public ClientCertAuthenticator()

Method Details

authenticate

public Principal authenticate(UserRealm realm,
                              String pathInContext,
                              HttpRequest request,
                              HttpResponse response)
            throws IOException
Specified by:
authenticate in interface Authenticator
Returns:
UserPrinciple if authenticated or null if not. If Authentication fails, then the authenticator may have committed the response as an auth challenge or redirect.

getAuthMethod

public String getAuthMethod()
Specified by:
getAuthMethod in interface Authenticator

getMaxHandShakeSeconds

public int getMaxHandShakeSeconds()

setMaxHandShakeSeconds

public void setMaxHandShakeSeconds(int maxHandShakeSeconds)
Parameters:
maxHandShakeSeconds - Maximum time to wait for SSL handshake if Client certification is required.

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.