pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.webdav.util
Class BasicAuthentication

java.lang.Object
  extended by org.torweg.pulse.webdav.util.BasicAuthentication

public final class BasicAuthentication
extends java.lang.Object

a simple implementation of the HTTP-Basic-Authentication.

Contains a backslash fix for Microsoft Clients: If the user name contains a backslash (which is an illegal character in pulse user names), we are confronted with a Windows Web Folder client. The user name will then be extracted after the last backslash.

Version:
$Revision: 1435 $
Author:
Thomas Weber

Field Summary
static java.lang.String HTTP_AUTHENTICATION_HEADER
          the authorization required header.
static java.lang.String HTTP_AUTHENTICATION_TYPE_BASIC
          the authentication type.
 
Method Summary
static User authenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          performs the HTTP Basic Authentication against the pulse user database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_AUTHENTICATION_HEADER

public static final java.lang.String HTTP_AUTHENTICATION_HEADER
the authorization required header.

See Also:
Constant Field Values

HTTP_AUTHENTICATION_TYPE_BASIC

public static final java.lang.String HTTP_AUTHENTICATION_TYPE_BASIC
the authentication type.

See Also:
Constant Field Values
Method Detail

authenticate

public static User authenticate(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
performs the HTTP Basic Authentication against the pulse user database.

Parameters:
request - the request
response - the response
Returns:
the authenticated User or null, if no User could be authenticated