protected function authorize($requested, $provided)
 {
     if ($requested === $provided || $requested === '*/*') {
         return $provided;
     }
     if (false !== strpos($requested, '/')) {
         list($requestedA, $requestedB) = explode('/', $requested);
         list($providedA, ) = explode('/', $provided);
         if ($providedA === $requestedA && $requestedB === '*') {
             return $providedA;
         }
     }
     return parent::authorize($requested, $provided);
 }
 protected function authorize($requested, $provided)
 {
     $requested = preg_replace('/^x\\-/', '', $requested);
     $provided = preg_replace('/^x\\-/', '', $provided);
     if ($requested == $provided) {
         return $provided;
     }
     if (stripos($requested, '-') || !stripos($provided, '-')) {
         return false;
     }
     list($providedA, ) = explode('-', $provided);
     if ($requested === $providedA) {
         return $providedA;
     }
     return parent::authorize($requested, $provided);
 }