Interface sun.server.http.security.HttpAuthentication
All Packages Class Hierarchy This Package Previous Next Index
Interface sun.server.http.security.HttpAuthentication
- public interface HttpAuthentication
- extends Object
-
authenticate(HttpRequest)
- A function that authenticates the request by reading the authenticate header field in
the HTTP request.
-
getRealm()
- returns the realm of the authentication.
-
getScheme()
- returns the name of the authentication scheme.
-
sendError(HttpRequest, HttpResponse)
- sends the unauthorized error to HttpResponse.
authenticate
public abstract String authenticate(HttpRequest req) throws AuthenticationException
- A function that authenticates the request by reading the authenticate header field in
the HTTP request.
- Parameters:
- req - the Http request header.
- Returns:
- the name of the authenticated user.
- Throws: AuthenticationException
- is thrown if the request is unauthenticated.
getScheme
public abstract String getScheme()
- returns the name of the authentication scheme.
- Returns:
- the scheme used
getRealm
public abstract String getRealm()
- returns the realm of the authentication.
- Returns:
- the realm name
sendError
public abstract void sendError(HttpRequest req,
HttpResponse res) throws IOException
- sends the unauthorized error to HttpResponse.
- Parameters:
- req - request
- res - response
All Packages Class Hierarchy This Package Previous Next Index