The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
RedBasicAuth Class Reference

Authentication backend class for RedDAV. More...

Inheritance diagram for RedBasicAuth:

Public Member Functions

 setCurrentUser ($name)
 
 getCurrentUser ()
 
 setTimezone ($timezone)
 Sets the timezone from the channel in RedBasicAuth. More...
 
 getTimezone ()
 Returns the timezone. More...
 
 setBrowserPlugin ($browser)
 Set browser plugin for SabreDAV. More...
 
 log ()
 

Public Attributes

 $channel_id = 0
 
 $channel_hash = ''
 
 $observer = ''
 
 $browser
 
 $owner_id = 0
 
 $owner_nick = ''
 

Protected Member Functions

 validateUserPass ($username, $password)
 Validates a username and password. More...
 
 setAuthenticated ($r)
 Sets variables and session parameters after successfull authentication. More...
 

Protected Attributes

 $channel_name = null
 
 $timezone = ''
 

Detailed Description

Authentication backend class for RedDAV.

This class also contains some data which is not necessary for authentication like timezone settings.

Member Function Documentation

RedBasicAuth::getCurrentUser ( )

Returns information about the currently logged-in channel.

If nobody is currently logged in, this method should return null.

See Also
DAV::getCurrentUser
Returns
string|null
RedBasicAuth::getTimezone ( )

Returns the timezone.

Returns
string Return the channel's timezone.
RedBasicAuth::log ( )

Prints out all RedBasicAuth variables to logger().

Returns
void
RedBasicAuth::setAuthenticated (   $r)
protected

Sets variables and session parameters after successfull authentication.

Parameters
array$rArray with the values for the authenticated channel.
Returns
bool

Referenced by validateUserPass().

RedBasicAuth::setBrowserPlugin (   $browser)

Set browser plugin for SabreDAV.

See Also
RedBrowser::set_writeable()
Parameters
DAV\Browser\Plugin$browser
RedBasicAuth::setCurrentUser (   $name)

Sets the channel_name from the currently logged-in channel.

Parameters
string$nameThe channel's name
RedBasicAuth::setTimezone (   $timezone)

Sets the timezone from the channel in RedBasicAuth.

Set in mod/cloud.php if the channel has a timezone set.

Parameters
string$timezoneThe channel's timezone.
Returns
void
RedBasicAuth::validateUserPass (   $username,
  $password 
)
protected

Validates a username and password.

Guest access is granted with the password "+++".

See Also
DAV::validateUserPass
Parameters
string$username
string$password
Returns
bool

Member Data Documentation

RedBasicAuth::$browser

Referenced by setBrowserPlugin().

RedBasicAuth::$channel_hash = ''
RedBasicAuth::$channel_id = 0
RedBasicAuth::$channel_name = null
protected

Referenced by getCurrentUser().

RedBasicAuth::$observer = ''
RedBasicAuth::$owner_id = 0
RedBasicAuth::$owner_nick = ''
RedBasicAuth::$timezone = ''
protected

Referenced by getTimezone(), and setTimezone().


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