eZPublish  4.4
eZSSLZone Class Reference

SSL zones handling functionality. More...

Static Public Member Functions

static checkModuleView ($module, $view)
 Decide whether we should change access mode for this module view or not. More...
 
static checkNode ($module, $view, &$node, $redirect=true)
 Check whether the given node should cause access mode change. More...
 
static checkNodeID ($module, $view, $nodeID)
 Check whether the given node should cause access mode change. More...
 
static checkNodePath ($module, $view, $pathString, $redirect=true)
 Check whether the given node should cause access mode change. More...
 
static checkObject ($module, $view, $object)
 Check whether the given object should cause access mode change. More...
 

Public Attributes

const DEFAULT_SSL_PORT = 443
 

Static Private Member Functions

static cacheFileName ()
 
static clearCache ()
 
static clearCacheIfNeeded ()
 
static enabled ()
 Returns true if the SSL zones functionality is enabled, false otherwise. More...
 
static getSSLZones ()
 Load content SSL zones definitions. More...
 
static isKeepModeView ($module, $view)
 
static switchIfNeeded ($inSSL)
 
static viewIsInArray ($module, $view, $moduleViews)
 Checks if a given module/view pair is in the given list of views. More...
 

Detailed Description

SSL zones handling functionality.

Using functionality of this class you can mark certain parts of you site as "SSL zones". After that users will be able to access those parts only over SSL. When entering an SSL zone, user will be automatically switched to SSL. When leaving an SSL zone, user will be automatically switched to plain HTTP. Such a switch is called "access mode change" in the comments below.

SSL zones may be defined on either module/view basis, or on subtree basis.

For more details pleaase see doc/feautures/3.8/ssl_zones.txt

Member Function Documentation

static eZSSLZone::cacheFileName ( )
staticprivate

Referenced by clearCache(), and getSSLZones().

static eZSSLZone::checkModuleView (   $module,
  $view 
)
static

Decide whether we should change access mode for this module view or not.

Called from index.php.

static eZSSLZone::checkNode (   $module,
  $view,
$node,
  $redirect = true 
)
static

Check whether the given node should cause access mode change.

It it should, this method does not return.

static eZSSLZone::checkNodeID (   $module,
  $view,
  $nodeID 
)
static

Check whether the given node should cause access mode change.

It it should, this method does not return.

See Also
checkNode()
static eZSSLZone::checkNodePath (   $module,
  $view,
  $pathString,
  $redirect = true 
)
static

Check whether the given node should cause access mode change.

It it should, this method does not return.

Referenced by checkNode(), checkNodeID(), and checkObject().

static eZSSLZone::checkObject (   $module,
  $view,
  $object 
)
static

Check whether the given object should cause access mode change.

It it should, this method does not return.

static eZSSLZone::clearCache ( )
staticprivate
static eZSSLZone::clearCacheIfNeeded ( )
staticprivate
static eZSSLZone::enabled ( )
staticprivate

Returns true if the SSL zones functionality is enabled, false otherwise.

The result is cached in memory to save time on multiple invocations.

Referenced by checkModuleView(), checkNode(), checkNodeID(), checkNodePath(), checkObject(), and clearCacheIfNeeded().

static eZSSLZone::getSSLZones ( )
staticprivate

Load content SSL zones definitions.

Substitute URIs with corresponding path strings (e.g. "/news" would be subsituted with "/1/2/50"). The result is cached in memory to save time on multiple invocations. It is also saved in a cache file that is usually updated by eZContentCacheManager along with content cache.

Referenced by checkNodePath().

static eZSSLZone::isKeepModeView (   $module,
  $view 
)
staticprivate
Returns
true if the view is defined as 'keep'

Referenced by checkNode(), checkNodeID(), checkNodePath(), and checkObject().

static eZSSLZone::switchIfNeeded (   $inSSL)
staticprivate
Parameters
$inSSLThe desired access mode.

Change access mode (HTTP/HTTPS):

  • If previous mode was HHTP but $inSSL is true, we switch to SSL.
  • If previous mode was SSL but $inSSL is false, we switch to HTTP.
  • Otherwise no mode change is occured.

Mode change is done by redirect to the same URL, but with changed protocol (http/https) and TCP port.

In case of mode change this method does not return (exit() is called).

Referenced by checkModuleView(), checkNodePath(), and checkObject().

static eZSSLZone::viewIsInArray (   $module,
  $view,
  $moduleViews 
)
staticprivate

Checks if a given module/view pair is in the given list of views.

Wildcard matching on view name is done.

Returns
2 if wildcard match occurs on the given view 1 if exact match occurs on the given view 0 if the view is not found in the list

Referenced by checkModuleView(), and isKeepModeView().

Member Data Documentation

const eZSSLZone::DEFAULT_SSL_PORT = 443

The documentation for this class was generated from the following file: