QueryString.php 696 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /*
  3. * This file is part of jwt-auth.
  4. *
  5. * (c) 2014-2021 Sean Tymon <tymon148@gmail.com>
  6. * (c) 2021 PHP Open Source Saver
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace PHPOpenSourceSaver\JWTAuth\Http\Parser;
  12. use Illuminate\Http\Request;
  13. use PHPOpenSourceSaver\JWTAuth\Contracts\Http\Parser as ParserContract;
  14. class QueryString implements ParserContract
  15. {
  16. use KeyTrait;
  17. /**
  18. * Try to parse the token from the request query string.
  19. *
  20. * @return string|null
  21. */
  22. public function parse(Request $request)
  23. {
  24. return $request->query($this->key);
  25. }
  26. }