예제 #1
0
 /**
  * @param $type
  * @param $mac_function
  * @param $lifetime
  * @param $realm
  * @return IAssociation
  */
 private function buildAssociation($type, $mac_function, $lifetime, $realm)
 {
     $new_secret = OpenIdCryptoHelper::generateSecret($mac_function);
     $new_handle = AssocHandleGenerator::generate();
     $expires_in = intval($lifetime);
     $issued = gmdate("Y-m-d H:i:s", time());
     return new Association($new_handle, $new_secret, $mac_function, $expires_in, $issued, $type, $realm);
 }