Package org.opencms.xml.xml2json
Interface I_CmsApiAuthorizationHandler
-
public interface I_CmsApiAuthorizationHandler
Special authorization handler for APIs using stateless authorization.This does *not* handle authorization for normal OpenCms users (editors and website users), but is meant for use in APIs implemented as request handlers or resource init handlers. Authorization is supposed to be stateless, i.e. authorization information is passed with every HTTP request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CmsObject
initCmsObject(CmsObject adminCms, javax.servlet.http.HttpServletRequest request)
Authenticates a user from a request and returns a CmsObject initialized with that user.void
initialize(CmsObject cms)
Sets the admin CmsObject used internally by this handler.void
setParameters(CmsParameterConfiguration params)
Sets the configuration parameters for this handler.
-
-
-
Method Detail
-
initCmsObject
CmsObject initCmsObject(CmsObject adminCms, javax.servlet.http.HttpServletRequest request) throws CmsException
Authenticates a user from a request and returns a CmsObject initialized with that user.If no user can be authenticated from the request, this method returns null.
- Parameters:
adminCms
- a CmsObject with root admin privilegesrequest
- the request- Returns:
- the CmsObject for the request
- Throws:
CmsException
- if something goes wrong
-
initialize
void initialize(CmsObject cms)
Sets the admin CmsObject used internally by this handler.- Parameters:
cms
- the admin CmsObject to use
-
setParameters
void setParameters(CmsParameterConfiguration params)
Sets the configuration parameters for this handler.- Parameters:
params
- the configuration parameters
-
-