org.mmbase.util
Class HttpAuth

java.lang.Object
  extended by org.mmbase.util.HttpAuth

Deprecated. should be done by implementing and using the MMBase security Authorization

public class HttpAuth
extends Object

Version:
$Id: HttpAuth.java 35335 2009-05-21 08:14:41Z michiel $
Author:
vpro
Application:
SCAN - used for authentication by JamesServlet
Javadoc:

Constructor Summary
HttpAuth()
          Deprecated.  
 
Method Summary
static String checkUser(String mimeline)
          Deprecated. With a given mimeline, the username and password will be retrieved, and with it there will be looked if it is an valid login.
static String getAuthorization(HttpServletRequest req, HttpServletResponse res, String server, String level)
          Deprecated. Authenticates a user, If the user cannot be authenticated a login-popup will appear
static String getRemoteUser(HttpServletRequest req)
          Deprecated. getRemoteUser
static String getRemoteUser(PageInfo sp)
          Deprecated. getRemoteUser
static void setLocalCheckUrl(String url)
          Deprecated. Sets the url on which an authentication has to be checked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpAuth

public HttpAuth()
Deprecated. 
Method Detail

checkUser

public static String checkUser(String mimeline)
Deprecated. 
With a given mimeline, the username and password will be retrieved, and with it there will be looked if it is an valid login. If it is a valid login, with a rank higher or equals as Rank::BASICUSER, it will return a userid, otherwise null.

Parameters:
mimeline - The mimeline of the request
Returns:
a userid for the given user, of null when something goes wrong

getAuthorization

public static String getAuthorization(HttpServletRequest req,
                                      HttpServletResponse res,
                                      String server,
                                      String level)
                               throws AuthorizationException,
                                      NotLoggedInException
Deprecated. 
Authenticates a user, If the user cannot be authenticated a login-popup will appear

Parameters:
server - server-account. (for exameple 'film' or 'www')
level - loginlevel. (for example 'Basic' or 'MD5')
Returns:
username foan exception will be thrown.
Throws:
AuthorizationException - if the authorization fails.
NotLoggedInException - if the user hasn't logged in yet.
To Do:
remove logging on using remoteAuthenticationHost - this should be moved to the security layer

getRemoteUser

public static String getRemoteUser(HttpServletRequest req)
Deprecated. 
getRemoteUser

Parameters:
req -
Returns:
the remote user

getRemoteUser

public static String getRemoteUser(PageInfo sp)
Deprecated. 
getRemoteUser

Parameters:
sp -
Returns:
the remote user

setLocalCheckUrl

public static void setLocalCheckUrl(String url)
Deprecated. 
Sets the url on which an authentication has to be checked.

Parameters:
url -


MMBase 2.0-SNAPSHOT - null