org.apache.jackrabbit.server
Class BasicCredentialsProvider

java.lang.Object
  extended by org.apache.jackrabbit.server.BasicCredentialsProvider
All Implemented Interfaces:
CredentialsProvider

public class BasicCredentialsProvider
extends Object
implements CredentialsProvider

This Class implements a credentials provider that extracts the credentials from the 'WWW-Authenticate' header and only supports 'Basic' authentication.


Constructor Summary
BasicCredentialsProvider(String defaultHeaderValue)
          Constructs a new BasicCredentialsProvider with the given default value getCredentials(javax.servlet.http.HttpServletRequest) for details.
 
Method Summary
 Credentials getCredentials(javax.servlet.http.HttpServletRequest request)
          Extracts the credentials from the given servlet request. Build a Credentials object for the given authorization header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicCredentialsProvider

public BasicCredentialsProvider(String defaultHeaderValue)
Constructs a new BasicCredentialsProvider with the given default value getCredentials(javax.servlet.http.HttpServletRequest) for details.

Parameters:
defaultHeaderValue -
Method Detail

getCredentials

public Credentials getCredentials(javax.servlet.http.HttpServletRequest request)
                           throws LoginException,
                                  javax.servlet.ServletException
Extracts the credentials from the given servlet request. Build a Credentials object for the given authorization header. The creds may be used to login to the repository. If the specified header string is null or not of the required format the behaviour depends on the defaultHeaderValue field:

Specified by:
getCredentials in interface CredentialsProvider
Parameters:
request - the servlet request
Returns:
credentials or null.
Throws:
javax.servlet.ServletException - If an IOException occured while decoding the Authorization header.
LoginException - if no suitable auth header and missing-auth-mapping is not present


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.