Top Description Constructors Methods
org.mortbay.jetty.security

public Class BasicAuthenticator

extends Object
implements Authenticator
Class Inheritance
All Implemented Interfaces
org.mortbay.jetty.Authenticator, java.io.Serializable
Imports
java.io.IOException, java.security.Principal, javax.servlet.http.HttpServletResponse, org.mortbay.jetty.Authenticator, .HttpHeaders, .Request, .Response, .UserRealm, org.mortbay.log.Log, org.mortbay.util.StringUtil

BASIC authentication.
Author
Greg Wilkins (gregw)

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Principal

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.
authenticate
(UserRealm
an UserRealm value
realm
,
String
a String value
pathInContext
,
Request
a Request value
request
,
Response
a Response value. If non-null response is passed, then a failed authentication will result in a challenge response being set in the response.
response
)

Implements org.mortbay.jetty.Authenticator.authenticate.

Authenticate.
public String
public void
sendChallenge(UserRealm realm, Response response)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BasicAuthenticatorback to summary
public BasicAuthenticator()

Method Detail

authenticateback to summary
public Principal authenticate(UserRealm realm, String pathInContext, Request request, Response response) throws IOException

Implements org.mortbay.jetty.Authenticator.authenticate.

Doc from org.mortbay.jetty.Authenticator.authenticate.

Authenticate.

Parameters
realm:UserRealm

an UserRealm value

pathInContext:String

a String value

request:Request

a Request value

response:Response

a Response value. If non-null response is passed, then a failed authentication will result in a challenge response being set in the response.

Returns:Principal

UserPrinciple if authenticated or null if not. If Authentication fails, then the authenticator may have committed the response as an auth challenge or redirect.

Exceptions
IOException:
if an error occurs
getAuthMethodback to summary
public String getAuthMethod()

Implements org.mortbay.jetty.Authenticator.getAuthMethod.

sendChallengeback to summary
public void sendChallenge(UserRealm realm, Response response) throws IOException