| The Red Matrix

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
RedMatrix\RedDAV\RedBasicAuth Class Reference

Authentication backend class for RedDAV. More...

Inheritance diagram for RedMatrix\RedDAV\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 ()
| Prints out all RedBasicAuth variables to logger(). More...

## 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.

http://opensource.org/licenses/mit-license.php The MIT License (MIT)

## Member Function Documentation

RedMatrix\RedDAV\RedBasicAuth::getCurrentUser | ( |  | ) |

Returns information about the currently logged-in channel.

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

See Also
  ::getCurrentUser

Returns
  string|null

RedMatrix\RedDAV\RedBasicAuth::getTimezone | ( |  | ) |

Returns the timezone.

Returns
  string Return the channel's timezone.

RedMatrix\RedDAV\RedBasicAuth::log | ( |  | ) |

Prints out all RedBasicAuth variables to logger().

Returns
  void

RedMatrix\RedDAV\RedBasicAuth::setAuthenticated | ( |  | $r | ) |
| protected

Sets variables and session parameters after successfull authentication.

Parameters

  array | $r | Array with the values for the authenticated channel.

Returns
  bool

Referenced by RedMatrix\RedDAV\RedBasicAuth\validateUserPass().

RedMatrix\RedDAV\RedBasicAuth::setBrowserPlugin | ( |  | $browser | ) |

Set browser plugin for SabreDAV.

See Also
  RedBrowser::set_writeable()

Parameters

  \Sabre\DAV\Browser\Plugin | $browser |

RedMatrix\RedDAV\RedBasicAuth::setCurrentUser | ( |  | $name | ) |

Sets the channel_name from the currently logged-in channel.

Parameters

  string | $name | The channel's name

RedMatrix\RedDAV\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 | $timezone | The channel's timezone.

Returns
  void

RedMatrix\RedDAV\RedBasicAuth::validateUserPass | ( |  | $username,
|  |  | $password
| ) |  |
| protected

Validates a username and password.

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

See Also
  ::validateUserPass

Parameters

  string | $username |
  string | $password |

Returns
  bool

## Member Data Documentation

RedMatrix\RedDAV\RedBasicAuth::$browser

Referenced by RedMatrix\RedDAV\RedBasicAuth\setBrowserPlugin().

RedMatrix\RedDAV\RedBasicAuth::$channel_hash = ''

RedMatrix\RedDAV\RedBasicAuth::$channel_id = 0

RedMatrix\RedDAV\RedBasicAuth::$channel_name = null
| protected

Referenced by RedMatrix\RedDAV\RedBasicAuth\getCurrentUser().

RedMatrix\RedDAV\RedBasicAuth::$observer = ''

RedMatrix\RedDAV\RedBasicAuth::$owner_id = 0

RedMatrix\RedDAV\RedBasicAuth::$owner_nick = ''

RedMatrix\RedDAV\RedBasicAuth::$timezone = ''
| protected

Referenced by RedMatrix\RedDAV\RedBasicAuth\getTimezone(), and RedMatrix\RedDAV\RedBasicAuth\setTimezone().

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

- include/RedDAV/RedBasicAuth.php