Config.php 773 B

12345678910111213141516171819202122232425
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | A3Mall
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2020 http://www.a3-mall.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: xzncit <158373108@qq.com>
  8. // +----------------------------------------------------------------------
  9. namespace mall\library\tools\jwt;
  10. use Lcobucci\JWT\Configuration;
  11. use Lcobucci\JWT\Signer\Hmac\Sha256;
  12. use Lcobucci\JWT\Signer\Key\InMemory;
  13. class Config {
  14. public static function get(){
  15. return Configuration::forSymmetricSigner(
  16. new Sha256(),
  17. InMemory::base64Encoded(env('jwt.encryption'))
  18. );
  19. }
  20. }