com.arsdigita.kernel.security
Class DefaultSecurityHelper

java.lang.Object
  extended bycom.arsdigita.kernel.security.DefaultSecurityHelper
All Implemented Interfaces:
SecurityHelper
Direct Known Subclasses:
ParanoidSecurityHelper

public class DefaultSecurityHelper
extends Object
implements SecurityHelper

Default implementation of SecurityHelper interface.

Author:
Sameer Ajmani
See Also:
SecurityHelper

Field Summary
static String versionId
           
 
Constructor Summary
DefaultSecurityHelper()
           
 
Method Summary
 String getLoginURL(javax.servlet.http.HttpServletRequest req)
          Returns the full URL of the login page stored in the page map.
 boolean isSecure(javax.servlet.http.HttpServletRequest req)
          Determines whether the request is secure by calling req.isSecure().
 boolean requiresLogin(javax.servlet.http.HttpServletRequest req)
          Determines whether the current request requires that the user be logged in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

DefaultSecurityHelper

public DefaultSecurityHelper()
Method Detail

isSecure

public boolean isSecure(javax.servlet.http.HttpServletRequest req)
Determines whether the request is secure by calling req.isSecure().

Specified by:
isSecure in interface SecurityHelper
Parameters:
req - the request to check
Returns:
req.isSecure().

requiresLogin

public boolean requiresLogin(javax.servlet.http.HttpServletRequest req)
Determines whether the current request requires that the user be logged in.

Specified by:
requiresLogin in interface SecurityHelper
Parameters:
req - the request to check
Returns:
true if the request is secure and the page is not on a list of allowed pages (such as the login page and the bad-password page), false otherwise.

getLoginURL

public String getLoginURL(javax.servlet.http.HttpServletRequest req)
Returns the full URL of the login page stored in the page map.

Specified by:
getLoginURL in interface SecurityHelper
Returns:
the full URL of the login page.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC