|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.main.A_CmsAuthorizationHandler
org.opencms.security.CmsDefaultAuthorizationHandler
public class CmsDefaultAuthorizationHandler
Defines default authorization methods.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.opencms.security.I_CmsAuthorizationHandler |
|---|
I_CmsAuthorizationHandler.I_PrivilegedLoginAction |
| Field Summary | |
|---|---|
static String |
AUTHORIZATION_BASIC_PREFIX
Basic authorization prefix constant. |
static String |
HEADER_AUTHORIZATION
Authorization header constant. |
static String |
SEPARATOR_CREDENTIALS
Credentials separator constant. |
| Fields inherited from class org.opencms.main.A_CmsAuthorizationHandler |
|---|
LOG, m_parameters |
| Constructor Summary | |
|---|---|
CmsDefaultAuthorizationHandler()
|
|
| Method Summary | |
|---|---|
protected CmsObject |
checkBasicAuthorization(javax.servlet.http.HttpServletRequest req)
Checks if the current request contains HTTP basic authentication information in the headers, if so the user is tried to log in with this data, and on success a session is generated. |
String |
getLoginFormURL(String loginFormURL,
String params,
String callbackURL)
Returns the full URL used to call a login form with additional parameters and a callbackURL. |
CmsObject |
initCmsObject(javax.servlet.http.HttpServletRequest request)
Creates a new cms object from the given request object. |
CmsObject |
initCmsObject(javax.servlet.http.HttpServletRequest request,
I_CmsAuthorizationHandler.I_PrivilegedLoginAction loginAction)
Creates a new cms object from the given request object. |
CmsObject |
initCmsObject(javax.servlet.http.HttpServletRequest request,
String userName,
String pwd)
Authenticates the current request with additional user information. |
void |
requestAuthorization(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String loginFormURL)
This method sends a request to the client to display a login form, it is needed for HTTP-Authentication. |
| Methods inherited from class org.opencms.main.A_CmsAuthorizationHandler |
|---|
initCmsObjectFromSession, registerSession, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String AUTHORIZATION_BASIC_PREFIX
public static final String HEADER_AUTHORIZATION
public static final String SEPARATOR_CREDENTIALS
| Constructor Detail |
|---|
public CmsDefaultAuthorizationHandler()
| Method Detail |
|---|
public String getLoginFormURL(String loginFormURL,
String params,
String callbackURL)
I_CmsAuthorizationHandler
loginFormURL - the form URL specified in the cms (either as a property or system-wide)params - additional parameters to provide to the login formcallbackURL - the call-back URL to redirect after a successful login
I_CmsAuthorizationHandler.getLoginFormURL(java.lang.String, java.lang.String, java.lang.String)public CmsObject initCmsObject(javax.servlet.http.HttpServletRequest request)
I_CmsAuthorizationHandlerThis method is called by OpenCms every time a resource is requested and the session can not automatically be authenticated.
request - the HTTP request to authenticate
I_CmsAuthorizationHandler.initCmsObject(HttpServletRequest)
public CmsObject initCmsObject(javax.servlet.http.HttpServletRequest request,
I_CmsAuthorizationHandler.I_PrivilegedLoginAction loginAction)
I_CmsAuthorizationHandlerThis method is called by OpenCms every time a resource is requested and the session can not automatically be authenticated.
request - the HTTP request to authenticateloginAction - the privileged login action
I_CmsAuthorizationHandler.initCmsObject(javax.servlet.http.HttpServletRequest, org.opencms.security.I_CmsAuthorizationHandler.I_PrivilegedLoginAction)
public CmsObject initCmsObject(javax.servlet.http.HttpServletRequest request,
String userName,
String pwd)
throws CmsException
I_CmsAuthorizationHandlerYou have to call this method by your own.
request - the HTTP request to authenticateuserName - the user name to authenticatepwd - the user password to authenticate with
CmsException - if something goes wrongI_CmsAuthorizationHandler.initCmsObject(HttpServletRequest, String, String)
public void requestAuthorization(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String loginFormURL)
throws IOException
req - the client requestres - the responseloginFormURL - the full URL used for form based authentication
IOException - if something goes wrongprotected CmsObject checkBasicAuthorization(javax.servlet.http.HttpServletRequest req)
req - the current HTTP request
null if failed
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||