Using the OSAPI Open Social API, i noticed there is no session storage available by default,
so this is a very quick way to implement a PHP-Session Bages Storage
// Session Storage implements Openid Storage Inside PHP Session, //for me the easiest way to handle openId data // // Description of osapiSessionStorage // //@author John Behrens (john.behrens@webconsults.eu) //class osapiSessionStorage extends osapiStorage
{ // // Retrieves the data for the given key, or false if they // key is unknown or expired // // @param String $key The key who's data to retrieve // @param int $expiration Experiration time in seconds // public
function get
($key,
$expiration =
false){ if(!
isset($_SESSION['osapi'])){ return false;
} if(isset($_SESSION['osapi'][$key])){ return $_SESSION['osapi'][$key];
}else{ return false;
} } // //Store the key => $value set. The $value is serialized // by this function so can be of any type // //@param String $key Key of the data // @param Any-type $value the data // public
function set
($key,
$value){ $_SESSION['osapi'][$key]=
$value;
} // // Removes the key/data pair for the given $key // // @param String $key // public
function delete
($key){ unset($_SESSION['osapi'][$key]);
} }?>