org.mortbay.http

Class ClientCertAuthenticator

public class ClientCertAuthenticator extends 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.15 2006/02/28 12:45:01 gregwilkins Exp $

Author: Greg Wilkins (gregw)

Constructor Summary
ClientCertAuthenticator()
Method Summary
Principalauthenticate(UserRealm realm, String pathInContext, HttpRequest request, HttpResponse response)
StringgetAuthMethod()
intgetMaxHandShakeSeconds()
voidsetMaxHandShakeSeconds(int maxHandShakeSeconds)

Constructor Detail

ClientCertAuthenticator

public ClientCertAuthenticator()

Method Detail

authenticate

public Principal authenticate(UserRealm realm, String pathInContext, HttpRequest request, HttpResponse response)

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.

Throws: IOException

getAuthMethod

public String getAuthMethod()

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.