Example #1
0
 /**
  * Retrieve JWT Authorization header from the request.
  *
  * @return string|null|false
  */
 function authorizationHeader()
 {
     $header = parent::authorizationHeader();
     if (null === $header) {
         return null;
     }
     $pattern = '/^JWT-Auth ([a-z0-9_\\-]+\\.[a-z0-9_\\-]+\\.[a-z0-9_\\-]+)$/i';
     if (1 === preg_match($pattern, $header, $matches)) {
         return $matches[1];
     }
     return false;
     // Error
 }