. */ interface IAuth { /** * Get the name of the authentication system (to be shown at the login prompt) * * @return string name of the authentication system */ public function getSystemName(); /** * Get the URL for account registration * * @return string url of the authentication system where new accounts can be registered */ public function getRegistrationUrl(); /** * Get the URL for editing an account * * @return string url of the authentication system where accounts can be edited */ public function getAccountEditUrl(); /** * Authenticate a user * * @param $user Username to authenticate with * @param $password Password to authenticate with * @return boolean true in case of success, otherwise false */ public function auth($user, $password); /** * Get the username of the logged in user (via auth()) * * @return string username of the user authenticated via auth() */ public function getUsername(); /** * Get an array of BodyCodes of the bodies where the authenticated user is board member * * @return array BodyCodes of bodies where the authenticated user is board member */ public function getBoardGroups(); /** * Get an array of BodyCodes of the bodies where the given user is board member * * @return array BodyCodes of bodies where the authenticated user is board member */ public function getBoardGroupsFor($user); /** * Retrieve a list of attributes of the authenticated user * * @param $attrs array of attributes to retrieve * @return array of the requested attributes (where available) */ public function getData($attrs); /** * Get e-mail by username * * @param $uid username * @return string e-mail address of the given username, or null when not found */ public function getEmailByUsername($uid); } ?>