Ampache
[ class tree: Ampache ] [ index: Ampache ] [ all elements ]

Class: vauth

Source Location: /lib/class/vauth.class.php

Class Overview


Vauth


Methods



Class Details

[line 27]
Vauth

This class handles all of the session related stuff in Ampache it takes over for the vauth libs, and takes some stuff out of other classes where it didn't belong




[ Top ]


Class Methods


static method authenticate [line 445]

static void authenticate( $username, $password)

authenticate

This takes a username and password and then returns true or false based on what happens when we try to do the auth then




Tags:

access:  public


Parameters:

   $username  
   $password  

[ Top ]

static method check_session [line 300]

static void check_session( )

check_session

This checks for an existing sessoin and if it's still valid then go ahead and start it and return true




Tags:

access:  public


[ Top ]

static method close [line 62]

static void close( )

close

This is run on the end of a sessoin, nothing to do here for now




Tags:

access:  public


[ Top ]

static method create_cookie [line 214]

static void create_cookie( )

create_cookie

This is seperated into it's own function because of some flaws in specific webservers *cough* IIS *cough* which prevent us from setting a cookie at the same time as a header redirect. As such on view of a login a cookie is set with the proper name




Tags:

access:  public


[ Top ]

static method create_remember_cookie [line 236]

static void create_remember_cookie( )

create_remember_cookie

This function just creates the remember me cookie, nothing special




Tags:

access:  public


[ Top ]

static method destroy [line 112]

static void destroy( $key)

destroy

This removes the specified sessoin from the database




Tags:

access:  public


Parameters:

   $key  

[ Top ]

static method gc [line 133]

static void gc( $maxlifetime)

gc

This function is randomly called and it cleans up the poo




Tags:

access:  public


Parameters:

   $maxlifetime  

[ Top ]

static method get_session_data [line 190]

static void get_session_data( $key)

get_session_data

This takes a key and returns the raw data from the database, nothing to see here move along people




Tags:

access:  public


Parameters:

   $key  

[ Top ]

static method http_auth [line 650]

static void http_auth( $username)

http_auth

This auth method relies on HTTP auth from Apache This is not a very secure method of authentication defaulted to off. Because if they can load the page they are considered to be authenticated we need to look and see if their user exists and if not, by golly we just go ahead and created it. NOT SECURE!!!!!




Tags:

access:  public


Parameters:

   $username  

[ Top ]

static method logout [line 148]

static void logout( [ $key = ''])

logout

This is called when you want to log out and nuke your session This is the function used for the Ajax logouts, if no id is passed it tries to find one from the session




Tags:

access:  public


Parameters:

   $key  

[ Top ]

static method open [line 47]

static void open( $save_path, $session_name)

open

This function is for opening a new session so we just verify that we have a database connection, nothing more is needed




Tags:

access:  public


Parameters:

   $save_path  
   $session_name  

[ Top ]

static method read [line 72]

static void read( $key)

read

This takes a key and then looks in the database and returns the value




Tags:

access:  public


Parameters:

   $key  

[ Top ]

static method session_create [line 252]

static void session_create( $data)

session_create

This is called when you want to create a new session it takes care of setting the initial cookie, and inserting the first chunk of data, nifty ain't it!




Tags:

access:  public


Parameters:

   $data  

[ Top ]

static method session_exists [line 336]

static void session_exists( $type, $key, [ $data = array()])

session_exists

This checks to see if the specified session of the specified type exists, it also provides an array of key'd data that may be required based on the type




Tags:

access:  public


Parameters:

   $type  
   $key  
   $data  

[ Top ]

static method session_extend [line 389]

static void session_extend( $sid)

session_extend

This should really be extend_session but hey you gotta go with the flow this takes a SID and extends it's expire




Tags:

access:  public


Parameters:

   $sid  

[ Top ]

static method ungimp_ie [line 424]

static void ungimp_ie( )

ungimp_ie

This function sets the cache limiting to public if you are running some flavor of IE. The detection used here is very conservative so feel free to fix it. This only has to be done if we're rolling HTTPS




Tags:

access:  public


[ Top ]

static method write [line 89]

static void write( $key, $value)

write

This saves the sessoin information into the database




Tags:

access:  public


Parameters:

   $key  
   $value  

[ Top ]

static method _auto_init [line 407]

static void _auto_init( )

_auto_init

This function is called when the object is included, this sets up the session_save_handler




Tags:

access:  public


[ Top ]


Documentation generated on Thu, 12 Feb 2009 08:00:12 +0900 by phpDocumentor 1.4.2