From: Rob H. <for...@us...> - 2002-10-19 04:40:44
|
Update of /cvsroot/sandweb/sandweb/doc/API In directory usw-pr-cvs1:/tmp/cvs-serv30051 Modified Files: Auth.txt Log Message: filled in info for all public methods in Auth Index: Auth.txt =================================================================== RCS file: /cvsroot/sandweb/sandweb/doc/API/Auth.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -U2 -r1.1 -r1.2 --- Auth.txt 17 Oct 2002 07:30:47 -0000 1.1 +++ Auth.txt 19 Oct 2002 04:40:40 -0000 1.2 @@ -16,149 +16,30 @@ DESCRIPTION + This method is a constructor. PARAMETERS - parameter (type: string) (required) + log_obj (type: string) (required) - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -login --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - + This contains a reference to an instantiated log object. -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - Default: none. -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -load_user --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS + data_dir (type: string) (required) + This is the path to SandWeb's data directory. -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - Default: none. -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -logout --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - + cookie_path (type: string) (required) -PARAMETERS + This is the path on the server side where cookie data is stored. - parameter (type: string) (required) - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -get_username --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - Default: none. + cookie_domain (type: string) (required) -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -set_auth_cookie --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION + This is the domain that we tell the browser this cookie belongs to. - -PARAMETERS - - parameter (type: string) (required) - Default: none. @@ -173,159 +54,41 @@ read the files specified, or they did not exist. -_store_cookie_info -------------------------------------------------------------------------------- METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_search_cookiedata --------------------------------------------------------------------------------- - -METHOD - methodname + login SYNOPSIS - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_write_cookiedata --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS + my $status = $auth->login( + username => $username, + password => $password, + salt => $salt, + ); DESCRIPTION + This method checks the username, password and salt + sent to it for validity. PARAMETERS - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_remove_cookiedata --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - + username (type: string) (required) -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - + Contains a username to check for authenticity. + Default: none. -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_set_user_info_username --------------------------------------------------------------------------------- + username (type: string) (required) -METHOD - methodname + Contains an encrypted password to check for authenticity. -SYNOPSIS - - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - Default: none. -RETURN CODES - - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_set_user_info_cookie --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - - -DESCRIPTION - + username (type: string) (required) -PARAMETERS - - parameter (type: string) (required) + Contains the salt for the encrypted password. Default: none. @@ -333,57 +96,51 @@ RETURN CODES - 1 = The operation completed successfully. + 1 = The user is authentic. - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? + 0 = The user is not authentic. - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_set_user_info_password -------------------------------------------------------------------------------- METHOD - methodname + load_user SYNOPSIS + my $status = $auth->load_user( + $cookie, + ); DESCRIPTION + Attempts to validate user's auth cookie, and load the user's + settings into the global hashes. PARAMETERS - parameter (type: string) (required) + Takes value of the user's cookie as an argument. - Default: none. - RETURN CODES - 1 = The operation completed successfully. + 1 = The cookie is valid, and the load completed successfully. - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? + 0 = The cookie is not valid, the user info was not loaded. - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. -_get_data_dir -------------------------------------------------------------------------------- METHOD - methodname + logout SYNOPSIS + my $stat = $auth->logout(); DESCRIPTION + Logs a user out of SandWeb by removing their cookie. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES @@ -392,91 +149,50 @@ 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? + Maybe the cookie file could not be written to? - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_logobj -------------------------------------------------------------------------------- METHOD - methodname + get_username SYNOPSIS + my $username = $auth->get_username() DESCRIPTION + Returns the current user's full username. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES - 1 = The operation completed successfully. + Returns a string. 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_get_cookie_path -------------------------------------------------------------------------------- METHOD - methodname + set_auth_cookie SYNOPSIS + my $cookie = $auth->set_auth_cookie(); DESCRIPTION + Generates random auth cookie. PARAMETERS - parameter (type: string) (required) - - Default: none. + None. RETURN CODES - 1 = The operation completed successfully. - - 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - -_get_cookie_domain --------------------------------------------------------------------------------- - -METHOD - methodname - -SYNOPSIS - -DESCRIPTION - - -PARAMETERS - - parameter (type: string) (required) - - Default: none. - -RETURN CODES - - 1 = The operation completed successfully. + Returns a randomly generated string. 0 = This means that the method got an error proccessing your request. - Perhaps an invalid parameter? - - -1 = This return value means that there was not sufficient permision to - read the files specified, or they did not exist. - |