![]()  | 
  
    The Hubzilla
    
   | 
 
Authentication backend class for DAV. More...
Public Member Functions | |
| check (RequestInterface $request, ResponseInterface $response) | |
| setCurrentUser ($name) | |
| getCurrentUser () | |
| setTimezone ($timezone) | |
| Sets the timezone from the channel in BasicAuth.  More... | |
| getTimezone () | |
| Returns the timezone.  More... | |
| setBrowserPlugin ($browser) | |
| Set browser plugin for SabreDAV.  More... | |
| log () | |
| Prints out all BasicAuth variables to logger().  More... | |
Public Attributes | |
| int | $channel_id = 0 | 
| channel_id of the current channel of the logged-in account.  More... | |
| string | $channel_hash = '' | 
| channel_hash of the current channel of the logged-in account.  More... | |
| string | $observer = '' | 
| Set in mod/cloud.php to observer_hash.  More... | |
| Sabre DAV Browser Plugin | $browser | 
| int | $owner_id = 0 | 
| channel_id of the current visited path. Set in Directory::getDir().  More... | |
| string | $owner_nick = '' | 
| $module_disabled = false | |
Protected Member Functions | |
| validateUserPass ($username, $password) | |
| Validates a username and password.  More... | |
| setAuthenticated ($r) | |
| Sets variables and session parameters after successfull authentication.  More... | |
| check_module_access ($channel_id) | |
Protected Attributes | |
| string null | $channel_name = null | 
| This variable holds the currently logged-in channel_address.  More... | |
| string | $timezone = '' | 
Authentication backend class for DAV.
This class also contains some data which is not necessary for authentication like timezone settings.
\DAV\Auth\Backend\AbstractBasic
License: http://opensource.org/licenses/mit-license.php The MIT License (MIT)
| Zotlabs\Storage\BasicAuth::check | ( | RequestInterface | $request, | 
| ResponseInterface | $response | ||
| ) | 
When this method is called, the backend must check if authentication was successful.
The returned value must be one of the following
[true, "principals/username"] [false, "reason for failure"]
If authentication was successful, it's expected that the authentication backend returns a so-called principal url.
Examples of a principal url:
principals/admin principals/user1 principals/users/joe principals/uid/123457
If you don't use WebDAV ACL (RFC3744) we recommend that you simply return a string such as:
principals/users/[username]
| RequestInterface | $request | |
| ResponseInterface | $response | 
      
  | 
  protected | 
| Zotlabs\Storage\BasicAuth::getCurrentUser | ( | ) | 
Returns information about the currently logged-in channel.
If nobody is currently logged in, this method should return null.
| Zotlabs\Storage\BasicAuth::getTimezone | ( | ) | 
Returns the timezone.
      
  | 
  protected | 
Sets variables and session parameters after successfull authentication.
| array | $r | Array with the values for the authenticated channel. | 
| Zotlabs\Storage\BasicAuth::setBrowserPlugin | ( | $browser | ) | 
Set browser plugin for SabreDAV.
| \Sabre\DAV\Browser\Plugin | $browser | 
| Zotlabs\Storage\BasicAuth::setCurrentUser | ( | $name | ) | 
Sets the channel_name from the currently logged-in channel.
| string | $name | The channel's name | 
| Zotlabs\Storage\BasicAuth::setTimezone | ( | $timezone | ) | 
Sets the timezone from the channel in BasicAuth.
Set in mod/cloud.php if the channel has a timezone set.
| string | $timezone | The channel's timezone. | 
      
  | 
  protected | 
Validates a username and password.
| string | $username | |
| string | $password | 
| Sabre DAV Browser Plugin Zotlabs\Storage\BasicAuth::$browser | 
| string Zotlabs\Storage\BasicAuth::$channel_hash = '' | 
channel_hash of the current channel of the logged-in account.
$channel_hash
| int Zotlabs\Storage\BasicAuth::$channel_id = 0 | 
channel_id of the current channel of the logged-in account.
$channel_id
      
  | 
  protected | 
This variable holds the currently logged-in channel_address.
It is used for building path in filestorage/.
$channel_name
| Zotlabs\Storage\BasicAuth::$module_disabled = false | 
| string Zotlabs\Storage\BasicAuth::$observer = '' | 
Set in mod/cloud.php to observer_hash.
$observer
| int Zotlabs\Storage\BasicAuth::$owner_id = 0 | 
channel_id of the current visited path. Set in Directory::getDir().
$owner_id
| string Zotlabs\Storage\BasicAuth::$owner_nick = '' | 
channel_name of the current visited path. Set in Directory::getDir().
Used for creating the path in cloud/
$owner_nick
      
  | 
  protected |